Skip to content

Commit

Permalink
Revert "ref: upgrade to python 3.11 (#59730)"
Browse files Browse the repository at this point in the history
This reverts commit bdcfda8.

Co-authored-by: asottile-sentry <103459774+asottile-sentry@users.noreply.github.com>
  • Loading branch information
getsentry-bot and asottile-sentry committed Dec 21, 2023
1 parent 86d4399 commit f3ad67a
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-sentry/action.yml
Expand Up @@ -34,7 +34,7 @@ inputs:
python-version:
description: 'python version to install'
required: false
default: '3.11.6'
default: '3.10.13'
pg-version:
description: 'PostgreSQL version to use'
default: '14'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/backend.yml
Expand Up @@ -195,7 +195,7 @@ jobs:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
- uses: getsentry/action-setup-venv@9e3bbae3836b1b6f129955bf55a19e1d99a61c67 # v1.0.5
with:
python-version: 3.11.6
python-version: 3.10.13
cache-dependency-path: requirements-dev-frozen.txt
install-cmd: python3 -m tools.hack_pip && pip install -q --constraint requirements-dev-frozen.txt pip-tools
- name: check requirements
Expand Down Expand Up @@ -278,7 +278,7 @@ jobs:

- uses: getsentry/action-setup-venv@9e3bbae3836b1b6f129955bf55a19e1d99a61c67 # v1.0.5
with:
python-version: 3.11.6
python-version: 3.10.13
cache-dependency-path: requirements-dev-frozen.txt
install-cmd: python3 -m tools.hack_pip && pip install -r requirements-dev-frozen.txt

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/development-environment.yml
Expand Up @@ -61,7 +61,7 @@ jobs:
# This handles Python's cache
- uses: getsentry/action-setup-venv@9e3bbae3836b1b6f129955bf55a19e1d99a61c67 # v1.0.5
with:
python-version: 3.11.6
python-version: 3.10.13
cache-dependency-path: requirements-dev-frozen.txt

# This tests starting up the dev services, loading mocks and pre-commit installation
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
- uses: getsentry/action-setup-venv@9e3bbae3836b1b6f129955bf55a19e1d99a61c67 # v1.0.5
with:
python-version: 3.11.6
python-version: 3.10.13
cache-dependency-path: |
requirements-dev.txt
requirements-dev-frozen.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Expand Up @@ -55,7 +55,7 @@ jobs:
- uses: getsentry/action-setup-venv@9e3bbae3836b1b6f129955bf55a19e1d99a61c67 # v1.0.5
with:
python-version: 3.11.6
python-version: 3.10.13
cache-dependency-path: |
requirements-dev.txt
requirements-dev-frozen.txt
Expand Down
2 changes: 1 addition & 1 deletion .python-version
@@ -1 +1 @@
3.11.6
3.10.13
18 changes: 9 additions & 9 deletions devenv/config.ini
@@ -1,10 +1,10 @@
[python]
version = 3.11.6
darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-x86_64-apple-darwin-install_only.tar.gz
darwin_x86_64_sha256 = 178cb1716c2abc25cb56ae915096c1a083e60abeba57af001996e8bc6ce1a371
darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-aarch64-apple-darwin-install_only.tar.gz
darwin_arm64_sha256 = 916c35125b5d8323a21526d7a9154ca626453f63d0878e95b9f613a95006c990
linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-x86_64-unknown-linux-gnu-install_only.tar.gz
linux_x86_64_sha256 = ee37a7eae6e80148c7e3abc56e48a397c1664f044920463ad0df0fc706eacea8
linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-aarch64-unknown-linux-gnu-install_only.tar.gz
linux_arm64_sha256 = 3e26a672df17708c4dc928475a5974c3fb3a34a9b45c65fb4bd1e50504cc84ec
version = 3.10.13
darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.10.13+20231002-x86_64-apple-darwin-install_only.tar.gz
darwin_x86_64_sha256 = be0b19b6af1f7d8c667e5abef5505ad06cf72e5a11bb5844970c395a7e5b1275
darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.10.13+20231002-aarch64-apple-darwin-install_only.tar.gz
darwin_arm64_sha256 = fd027b1dedf1ea034cdaa272e91771bdf75ddef4c8653b05d224a0645aa2ca3c
linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.10.13+20231002-x86_64-unknown-linux-gnu-install_only.tar.gz
linux_x86_64_sha256 = 5d0429c67c992da19ba3eb58b3acd0b35ec5e915b8cae9a4aa8ca565c423847a
linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.10.13+20231002-aarch64-unknown-linux-gnu-install_only.tar.gz
linux_arm64_sha256 = 8675915ff454ed2f1597e27794bc7df44f5933c26b94aa06af510fe91b58bb97
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -54,7 +54,7 @@ filterwarnings = [
looponfailroots = ["src", "tests"]

[tool.mypy]
python_version = "3.11"
python_version = "3.10"
mypy_path = ["fixtures/stubs-for-mypy"]
plugins = ["pydantic.mypy", "mypy_django_plugin.main", "tools.mypy_helpers.plugin"]
files = ["."]
Expand Down
3 changes: 2 additions & 1 deletion requirements-dev-frozen.txt
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# make freeze-requirements
Expand Down Expand Up @@ -49,6 +49,7 @@ djangorestframework==3.14.0
docker==6.1.3
drf-spectacular==0.26.3
email-reply-parser==0.5.12
exceptiongroup==1.0.0rc9
execnet==1.9.0
fastjsonschema==2.16.2
fido2==0.9.2
Expand Down
3 changes: 2 additions & 1 deletion requirements-frozen.txt
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# make freeze-requirements
Expand Down Expand Up @@ -39,6 +39,7 @@ django-pg-zero-downtime-migrations==0.13
djangorestframework==3.14.0
drf-spectacular==0.26.3
email-reply-parser==0.5.12
exceptiongroup==1.2.0
fastjsonschema==2.16.2
fido2==0.9.2
google-api-core==2.15.0
Expand Down
4 changes: 2 additions & 2 deletions scripts/lib.sh
Expand Up @@ -69,11 +69,11 @@ EOF
else
minor=$(echo "${python_version}" | sed 's/[0-9]*\.\([0-9]*\)\.\([0-9]*\)/\1/')
patch=$(echo "${python_version}" | sed 's/[0-9]*\.\([0-9]*\)\.\([0-9]*\)/\2/')
if [ "$minor" -ne 11 ] || [ "$patch" -lt 6 ]; then
if [ "$minor" -ne 10 ] || [ "$patch" -lt 12 ]; then
cat <<EOF
${red}${bold}
ERROR: You're running a virtualenv with Python ${python_version}.
We only support >= 3.11.6, < 3.12.
We only support >= 3.10.12, < 3.11.
Either run "rm -rf ${venv_name} && direnv allow" to
OR set SENTRY_PYTHON_VERSION=${python_version} to an .env file to bypass this check."
EOF
Expand Down
2 changes: 1 addition & 1 deletion self-hosted/Dockerfile
@@ -1,4 +1,4 @@
FROM python:3.11.6-slim-bullseye
FROM python:3.10.13-slim-bullseye

LABEL maintainer="oss@sentry.io"
LABEL org.opencontainers.image.title="Sentry"
Expand Down

0 comments on commit f3ad67a

Please sign in to comment.