Browse Source

Revertx6: ref: upgrade to python 3.11 (#62402)

blocked on https://github.com/getsentry/sentry/pull/62395

This reverts commit 6dc406a028dd7d354553f42d85eeb0d5e36391a4.

<!-- Describe your PR here. -->
anthony sottile 1 year ago
parent
commit
6970d4d90b

+ 1 - 1
.github/actions/setup-sentry/action.yml

@@ -34,7 +34,7 @@ inputs:
   python-version:
     description: 'python version to install'
     required: false
-    default: '3.10.13'
+    default: '3.11.6'
   pg-version:
     description: 'PostgreSQL version to use'
     default: '14'

+ 2 - 2
.github/workflows/backend.yml

@@ -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.10.13
+          python-version: 3.11.6
           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
@@ -278,7 +278,7 @@ jobs:
 
       - uses: getsentry/action-setup-venv@9e3bbae3836b1b6f129955bf55a19e1d99a61c67 # v1.0.5
         with:
-          python-version: 3.10.13
+          python-version: 3.11.6
           cache-dependency-path: requirements-dev-frozen.txt
           install-cmd: python3 -m tools.hack_pip && pip install -r requirements-dev-frozen.txt
 

+ 2 - 2
.github/workflows/development-environment.yml

@@ -61,7 +61,7 @@ jobs:
       # This handles Python's cache
       - uses: getsentry/action-setup-venv@9e3bbae3836b1b6f129955bf55a19e1d99a61c67 # v1.0.5
         with:
-          python-version: 3.10.13
+          python-version: 3.11.6
           cache-dependency-path: requirements-dev-frozen.txt
 
       # This tests starting up the dev services, loading mocks and pre-commit installation
@@ -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.10.13
+          python-version: 3.11.6
           cache-dependency-path: |
             requirements-dev.txt
             requirements-dev-frozen.txt

+ 1 - 1
.github/workflows/pre-commit.yml

@@ -55,7 +55,7 @@ jobs:
 
       - uses: getsentry/action-setup-venv@9e3bbae3836b1b6f129955bf55a19e1d99a61c67 # v1.0.5
         with:
-          python-version: 3.10.13
+          python-version: 3.11.6
           cache-dependency-path: |
             requirements-dev.txt
             requirements-dev-frozen.txt

+ 1 - 1
.python-version

@@ -1 +1 @@
-3.10.13
+3.11.6

+ 9 - 9
devenv/config.ini

@@ -1,10 +1,10 @@
 [python]
-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
+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

+ 1 - 1
pyproject.toml

@@ -54,7 +54,7 @@ filterwarnings = [
 looponfailroots = ["src", "tests"]
 
 [tool.mypy]
-python_version = "3.10"
+python_version = "3.11"
 mypy_path = ["fixtures/stubs-for-mypy"]
 plugins = ["pydantic.mypy", "mypy_django_plugin.main", "tools.mypy_helpers.plugin"]
 files = ["."]

+ 1 - 2
requirements-dev-frozen.txt

@@ -1,5 +1,5 @@
 #
-# This file is autogenerated by pip-compile with Python 3.10
+# This file is autogenerated by pip-compile with Python 3.11
 # by the following command:
 #
 #    make freeze-requirements
@@ -48,7 +48,6 @@ djangorestframework==3.14.0
 docker==6.1.3
 drf-spectacular==0.26.3
 email-reply-parser==0.5.12
-exceptiongroup==1.2.0
 execnet==1.9.0
 fastjsonschema==2.16.2
 fido2==0.9.2

+ 1 - 2
requirements-frozen.txt

@@ -1,5 +1,5 @@
 #
-# This file is autogenerated by pip-compile with Python 3.10
+# This file is autogenerated by pip-compile with Python 3.11
 # by the following command:
 #
 #    make freeze-requirements
@@ -39,7 +39,6 @@ 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

+ 2 - 2
scripts/lib.sh

@@ -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 10 ] || [ "$patch" -lt 12 ]; then
+        if [ "$minor" -ne 11 ] || [ "$patch" -lt 6 ]; then
             cat <<EOF
     ${red}${bold}
     ERROR: You're running a virtualenv with Python ${python_version}.
-    We only support >= 3.10.12, < 3.11.
+    We only support >= 3.11.6, < 3.12.
     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

Some files were not shown because too many files changed in this diff