Skip to content

build: Upgrade Python from 3.11 to 3.13#7743

Merged
phacops merged 2 commits intomasterfrom
build/upgrade-python-3.13
Feb 25, 2026
Merged

build: Upgrade Python from 3.11 to 3.13#7743
phacops merged 2 commits intomasterfrom
build/upgrade-python-3.13

Conversation

@phacops
Copy link
Contributor

@phacops phacops commented Feb 17, 2026

Upgrade the project from Python 3.11.11 to 3.13.12, now that clickhouse-driver 0.2.10 supports Python 3.13 (getsentry/pypi#1916).

Changes:

  • .python-version: 3.11.11 → 3.13.12
  • Dockerfile: base image Python 3.11.11 → 3.13.12
  • pyproject.toml: clickhouse-driver ≥0.2.9 → ≥0.2.10, ruff target py311 → py313, mypy target 3.11 → 3.13
  • rust_snuba/pyproject.toml: requires-python ≥3.11 → ≥3.13
  • uv.lock: re-resolved for Python 3.13 (drops async-timeout and tomli now in stdlib)

Agent transcript: https://claudescope.sentry.dev/share/LtQGYk7onrBk-ENDs_yYRmACQloiohGN77czr_nUcYo

Upgrade the project from Python 3.11.11 to 3.13.12 and bump
clickhouse-driver minimum to 0.2.10 which adds Python 3.13 support.

Updates across Dockerfile, .python-version, pyproject.toml (ruff,
mypy targets), and rust_snuba requires-python.

Co-Authored-By: Claude <noreply@anthropic.com>

Agent transcript: https://claudescope.sentry.dev/share/2p4X8kt8wce9h4oX2kUtyDBF5aiyUx5J5gU_gJCkaPA
Bump freezegun from >=1.2.2 to >=1.5.5 to fix
`uuid._load_system_functions` removal in Python 3.13.

Upgrade docs-requirements.txt to Sphinx 9.0.4 and myst-parser 5.0.0
to fix `imghdr` module removal in Python 3.13.

Co-Authored-By: Claude <noreply@anthropic.com>
@phacops phacops marked this pull request as ready for review February 18, 2026 02:43
@phacops phacops requested a review from a team as a code owner February 18, 2026 02:43
version = 1
revision = 3
requires-python = ">=3.11"
revision = 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this a lower revision?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a uv-internal field tied to the lock file schema, it's not something we decide.

Copy link
Contributor

@onewland onewland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no red flags, but I'd be prepared to revert quickly if/when this blows up on deploy. e.g. don't merge and walk away

@phacops
Copy link
Contributor Author

phacops commented Feb 24, 2026

no red flags, but I'd be prepared to revert quickly if/when this blows up on deploy. e.g. don't merge and walk away

Of course. It also has to go through s4s2 and de before reaching us, so canary will tell us a lot if something is not working as intended.

@phacops phacops merged commit cf0e3c0 into master Feb 25, 2026
46 of 52 checks passed
@phacops phacops deleted the build/upgrade-python-3.13 branch February 25, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants