Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: upgrade to python 3.13.0 #80661

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-sentry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ inputs:
python-version:
description: 'python version to install'
required: false
default: '3.12.6'
default: '3.13.0'
pg-version:
description: 'PostgreSQL version to use'
default: '14'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: getsentry/action-setup-venv@a133e6fd5fa6abd3f590a1c106abda344f5df69f # v2.1.0
with:
python-version: 3.12.6
python-version: 3.13.0
cache-dependency-path: requirements-dev-frozen.txt
install-cmd: pip install -q --constraint requirements-dev-frozen.txt pip-tools
- name: check requirements
Expand Down Expand Up @@ -301,7 +301,7 @@ jobs:

- uses: getsentry/action-setup-venv@a133e6fd5fa6abd3f590a1c106abda344f5df69f # v2.1.0
with:
python-version: 3.12.6
python-version: 3.13.0
cache-dependency-path: requirements-dev-frozen.txt
install-cmd: pip install -r requirements-dev-frozen.txt

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/development-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: getsentry/action-setup-venv@a133e6fd5fa6abd3f590a1c106abda344f5df69f # v2.1.0
with:
python-version: 3.12.6
python-version: 3.13.0
cache-dependency-path: |
requirements-dev.txt
requirements-dev-frozen.txt
Expand All @@ -52,7 +52,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: getsentry/action-setup-venv@a133e6fd5fa6abd3f590a1c106abda344f5df69f # v2.1.0
with:
python-version: 3.12.6
python-version: 3.13.0
cache-dependency-path: |
requirements-dev.txt
requirements-dev-frozen.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:

- uses: getsentry/action-setup-venv@a133e6fd5fa6abd3f590a1c106abda344f5df69f # v2.1.0
with:
python-version: 3.12.6
python-version: 3.13.0
cache-dependency-path: |
requirements-dev.txt
requirements-dev-frozen.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

- uses: getsentry/action-setup-venv@a133e6fd5fa6abd3f590a1c106abda344f5df69f # v2.1.0
with:
python-version: 3.12.6
python-version: 3.13.0

- name: React to product-owners.yml changes
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/self-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- uses: getsentry/action-setup-venv@a133e6fd5fa6abd3f590a1c106abda344f5df69f # v2.1.0
with:
python-version: 3.12.6
python-version: 3.13.0
cache-dependency-path: requirements-dev-frozen.txt
install-cmd: echo

Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.12.6
3.13.0
40 changes: 20 additions & 20 deletions devenv/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
minimum_version = 1.13.0

[venv.sentry]
python = 3.12.6
python = 3.13.0
path = .venv
requirements = requirements-dev.txt
editable =
Expand All @@ -11,7 +11,7 @@ editable =
# bins =

[venv.getsentry]
python = 3.12.6
python = 3.13.0
# technically these are conflicting paths but getsentry is special
# and would rather keep devenv config symlinked
path = .venv
Expand All @@ -20,15 +20,15 @@ editable = .
# but we'll just install it during sync as it's rarely populated
requirements = sentry-requirements-dev-frozen.txt

[python3.12.6]
darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240909/cpython-3.12.6+20240909-x86_64-apple-darwin-install_only.tar.gz
darwin_x86_64_sha256 = 8c56da91436bee158b0d592aed3393c1fe3da3694ca35950ee1c52935ba8bfd5
darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240909/cpython-3.12.6+20240909-aarch64-apple-darwin-install_only.tar.gz
darwin_arm64_sha256 = 899f46eb592fcac4e834c064e4c901e8a4a6b5864e80b18efd2f0b7c3c050584
linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240909/cpython-3.12.6+20240909-x86_64-unknown-linux-gnu-install_only.tar.gz
linux_x86_64_sha256 = 68ff386c923c59a33a272bd984b8a33fe8117c56ad7f7552e0c2b21937ee3c0b
linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240909/cpython-3.12.6+20240909-aarch64-unknown-linux-gnu-install_only.tar.gz
linux_arm64_sha256 = caac1033f68f69d8978dc8c6b6964cfb9d8a111abc55c03403bd4ece63f331f3
[python3.13.0]
darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20241016/cpython-3.13.0+20241016-x86_64-apple-darwin-install_only.tar.gz
darwin_x86_64_sha256 = cff1b7e7cd26f2d47acac1ad6590e27d29829776f77e8afa067e9419f2f6ce77
darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20241016/cpython-3.13.0+20241016-aarch64-apple-darwin-install_only.tar.gz
darwin_arm64_sha256 = 31397953849d275aa2506580f3fa1cb5a85b6a3d392e495f8030e8b6412f5556
linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20241016/cpython-3.13.0+20241016-x86_64-unknown-linux-gnu-install_only.tar.gz
linux_x86_64_sha256 = 2c8cb15c6a2caadaa98af51df6fe78a8155b8471cb3dd7b9836038e0d3657fb4
linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20241016/cpython-3.13.0+20241016-aarch64-unknown-linux-gnu-install_only.tar.gz
linux_arm64_sha256 = e8378c0162b2e0e4cc1f62b29443a3305d116d09583304dbb0149fecaff6347b

[node]
# upstream (https://nodejs.org/dist/) is not reliable enough so we've mirrored it to GCS
Expand Down Expand Up @@ -68,12 +68,12 @@ version = 0.23.2

# kept here only for compatibility with older `devenv`
[python]
version = 3.12.6
darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240909/cpython-3.12.6+20240909-x86_64-apple-darwin-install_only.tar.gz
darwin_x86_64_sha256 = 8c56da91436bee158b0d592aed3393c1fe3da3694ca35950ee1c52935ba8bfd5
darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240909/cpython-3.12.6+20240909-aarch64-apple-darwin-install_only.tar.gz
darwin_arm64_sha256 = 899f46eb592fcac4e834c064e4c901e8a4a6b5864e80b18efd2f0b7c3c050584
linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240909/cpython-3.12.6+20240909-x86_64-unknown-linux-gnu-install_only.tar.gz
linux_x86_64_sha256 = 68ff386c923c59a33a272bd984b8a33fe8117c56ad7f7552e0c2b21937ee3c0b
linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240909/cpython-3.12.6+20240909-aarch64-unknown-linux-gnu-install_only.tar.gz
linux_arm64_sha256 = caac1033f68f69d8978dc8c6b6964cfb9d8a111abc55c03403bd4ece63f331f3
version = 3.13.0
darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20241016/cpython-3.13.0+20241016-x86_64-apple-darwin-install_only.tar.gz
darwin_x86_64_sha256 = cff1b7e7cd26f2d47acac1ad6590e27d29829776f77e8afa067e9419f2f6ce77
darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20241016/cpython-3.13.0+20241016-aarch64-apple-darwin-install_only.tar.gz
darwin_arm64_sha256 = 31397953849d275aa2506580f3fa1cb5a85b6a3d392e495f8030e8b6412f5556
linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20241016/cpython-3.13.0+20241016-x86_64-unknown-linux-gnu-install_only.tar.gz
linux_x86_64_sha256 = 2c8cb15c6a2caadaa98af51df6fe78a8155b8471cb3dd7b9836038e0d3657fb4
linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20241016/cpython-3.13.0+20241016-aarch64-unknown-linux-gnu-install_only.tar.gz
linux_arm64_sha256 = e8378c0162b2e0e4cc1f62b29443a3305d116d09583304dbb0149fecaff6347b
2 changes: 1 addition & 1 deletion requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ cryptography>=38.0.3
# Note, grpcio>1.30.0 requires setting GRPC_POLL_STRATEGY=epoll1
# See https://github.com/grpc/grpc/issues/23796 and
# https://github.com/grpc/grpc/blob/v1.35.x/doc/core/grpc-polling-engines.md#polling-engine-implementations-in-grpc
grpcio>=1.59.0
grpcio>=1.67

# not directly used, but provides a speedup for redis
hiredis>=2.3.2
Expand Down
4 changes: 2 additions & 2 deletions requirements-dev-frozen.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# This file is autogenerated by pip-compile with Python 3.13
# by the following command:
#
# make freeze-requirements
Expand Down Expand Up @@ -70,7 +70,7 @@ google-resumable-media==2.7.0
googleapis-common-protos==1.63.2
grpc-google-iam-v1==0.13.1
grpc-stubs==1.53.0.5
grpcio==1.60.1
grpcio==1.67.0
grpcio-status==1.60.1
h11==0.13.0
h2==4.1.0
Expand Down
4 changes: 2 additions & 2 deletions requirements-frozen.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# This file is autogenerated by pip-compile with Python 3.13
# by the following command:
#
# make freeze-requirements
Expand Down Expand Up @@ -57,7 +57,7 @@ google-resumable-media==2.7.0
googleapis-common-protos==1.63.2
grpc-google-iam-v1==0.13.1
grpc-stubs==1.53.0.5
grpcio==1.60.1
grpcio==1.67.0
grpcio-status==1.60.1
h11==0.14.0
h2==4.1.0
Expand Down
4 changes: 2 additions & 2 deletions scripts/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,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 12 ] || [ "$patch" -lt 1 ]; then
if [ "$minor" -ne 13 ] || [ "$patch" -lt 0 ]; then
cat <<EOF
${red}${bold}
ERROR: You're running a virtualenv with Python ${python_version}.
We only support >= 3.12.1, < 3.13.
We only support >= 3.13.0, < 3.14.
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.12.6-slim-bookworm
FROM python:3.13.0-slim-bookworm

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.title="Sentry"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class TestGenerateControlsiloUrls(TestCase):
def call_command(self, *args, **kwargs):
out = StringIO()
call_command("generate_controlsilo_urls", *args, stdout=out, stderr=StringIO, **kwargs)
call_command("generate_controlsilo_urls", *args, stdout=out, stderr=StringIO(), **kwargs)
return out.getvalue()

def test_skip_includes(self):
Expand Down
Loading