Browse Source

ref: upgrade to python 3.9 (#36860)

anthony sottile 1 year ago
parent
commit
adeb447c14

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

@@ -34,7 +34,7 @@ inputs:
   python-version:
     description: 'python version to install'
     required: false
-    default: '3.8.18'
+    default: '3.9.18'
   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.8.18
+          python-version: 3.9.18
           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.8.18
+          python-version: 3.9.18
           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.8.18
+          python-version: 3.9.18
           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.8.18
+          python-version: 3.9.18
           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.8.18
+          python-version: 3.9.18
           cache-dependency-path: |
             requirements-dev.txt
             requirements-dev-frozen.txt

+ 1 - 1
.python-version

@@ -1 +1 @@
-3.8.18
+3.9.18

+ 9 - 9
devenv/config.ini

@@ -1,10 +1,10 @@
 [python]
-version = 3.8.18
-darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.8.18+20231002-x86_64-apple-darwin-install_only.tar.gz
-darwin_x86_64_sha256 = fcf04532e644644213977242cd724fe5e84c0a5ac92ae038e07f1b01b474fca3
-darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.8.18+20231002-aarch64-apple-darwin-install_only.tar.gz
-darwin_arm64_sha256 = 1825b1f7220bc93ff143f2e70b5c6a79c6469e0eeb40824e07a7277f59aabfda
-linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.8.18+20231002-x86_64-unknown-linux-gnu-install_only.tar.gz
-linux_x86_64_sha256 = 1e8a3babd1500111359b0f5675d770984bcbcb2cc8890b117394f0ed342fb9ec
-linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.8.18+20231002-aarch64-unknown-linux-gnu-install_only.tar.gz
-linux_arm64_sha256 = 236a300f386ead02ca98dbddbc026ff4ef4de6701a394106e291ff8b75445ee1
+version = 3.9.18
+darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.9.18+20231002-x86_64-apple-darwin-pgo+lto-full.tar.zst
+darwin_x86_64_sha256 = 0ee342ed3d6051a41e7702bec98db463c5ffe4dcb634e10cae464e42adb2fb3e
+darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.9.18+20231002-aarch64-apple-darwin-pgo+lto-full.tar.zst
+darwin_arm64_sha256 = bdf883f6a6ba9ea1bd72029670737232bfbd9a07708d85dd2bf6a3deb2aa3a5d
+linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.9.18+20231002-x86_64-unknown-linux-gnu-pgo+lto-full.tar.zst
+linux_x86_64_sha256 = 02f5c6bf29f173fe1653965409b891691ab413e579766d3e5bccdc74634b9bde
+linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.9.18+20231002-aarch64-unknown-linux-gnu-lto-full.tar.zst
+linux_arm64_sha256 = 4cd4240b08e82e0b279152cd2afad556a0c8cd9ee3d285fe3a5770b5a934fe26

+ 1 - 1
pyproject.toml

@@ -54,7 +54,7 @@ filterwarnings = [
 looponfailroots = ["src", "tests"]
 
 [tool.mypy]
-python_version = "3.8"
+python_version = "3.9"
 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.8
+# This file is autogenerated by pip-compile with Python 3.9
 # by the following command:
 #
 #    make freeze-requirements
@@ -12,7 +12,6 @@ asgiref==3.7.2
 async-generator==1.10
 attrs==19.2.0
 avalara==20.9.0
-backports-zoneinfo==0.2.1
 beautifulsoup4==4.7.1
 billiard==4.2.0
 black==22.10.0

+ 1 - 2
requirements-frozen.txt

@@ -1,5 +1,5 @@
 #
-# This file is autogenerated by pip-compile with Python 3.8
+# This file is autogenerated by pip-compile with Python 3.9
 # by the following command:
 #
 #    make freeze-requirements
@@ -11,7 +11,6 @@ anyio==3.7.1
 asgiref==3.7.2
 attrs==19.2.0
 avalara==20.9.0
-backports-zoneinfo==0.2.1
 beautifulsoup4==4.7.1
 billiard==4.2.0
 boto3==1.28.26

+ 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 8 ] || [ "$patch" -lt 10 ]; then
+        if [ "$minor" -ne 9 ] || [ "$patch" -lt 10 ]; then
             cat <<EOF
     ${red}${bold}
     ERROR: You're running a virtualenv with Python ${python_version}.
-    We only support >= 3.8.10, < 3.9.
+    We only support >= 3.9.10, < 3.10.
     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