Skip to content

chore(python): upgrade python + python-fastapi to 3.13 and latest dependencies#439

Merged
sanketsudake merged 2 commits into
masterfrom
python-updates
Jun 6, 2026
Merged

chore(python): upgrade python + python-fastapi to 3.13 and latest dependencies#439
sanketsudake merged 2 commits into
masterfrom
python-updates

Conversation

@sanketsudake
Copy link
Copy Markdown
Member

What

Part of the dependency-update series (#436, #437, #438). Updates both Python environments:

python

  • Base: python:3.11-alpinepython:3.13-alpine (runtime + builder Dockerfiles, Makefile buildargs, skaffold buildArgs, READMEs)
  • requirements.txt — all pins to latest: Flask 2.1.1 → 3.1.3, Werkzeug 2.2.2 → 3.1.8 (fixes dependabot #405 and goes further), gevent 22.10.2 → 26.5.0, greenlet → 3.5.1, bjoern → 3.2.2, redis → 8.0.0, requests → 2.34.2, sentry-sdk → 2.61.1, urllib3 → 2.7.0, plus all transitive pins
  • flask_sockets.py fix required for Werkzeug 3: parse_cookie moved to werkzeug.sansio.http (same string-arg signature; call site unchanged)

python-fastapi

  • Base → 3.13-alpine; fastapi 0.114.0 → 0.136.3, uvicorn 0.30.6 → 0.49.0

CI (hunks mirror #436 → clean merges)

  • Fixed the python job gate: contains( needs.check.outputs, 'python' ) was missing .packagesthe python CI job never triggered on python changes. Now exact-match '"python"' so python-fastapi changes don't cross-trigger it either.
  • setup-python v2 → v6, python 3.13 in both jobs.

Releases

  • envconfig.json both → 1.35.0 (runtimeVersion 3.13); environments.json regenerated.

Verification (local, python 3.13)

  • ✅ Full requirements.txt install (bjoern compiles against libev)
  • ✅ Server, bjoern mode: healthz/specialize 200; GET/POST/PUT/DELETE/OPTIONS/HEAD all return the specialized function
  • ✅ Server, GEVENT mode (exercises flask_sockets + gevent-ws — the risky path): healthz/specialize/invoke 200
  • fastapi server: healthz/specialize/invoke 200
  • ✅ All four images (env + builder × 2) build on 3.13-alpine; builder verified Python 3.13.13

Supersedes

🤖 Generated with Claude Code

…endencies

python:
- Base image 3.11-alpine -> 3.13-alpine everywhere (Dockerfiles,
  Makefile buildargs incl. the previously missed builder Makefiles,
  skaffold buildArgs, READMEs)
- requirements.txt: all pins to latest — Flask 2.1.1 -> 3.1.3,
  Werkzeug 2.2.2 -> 3.1.8, gevent 22.10.2 -> 26.5.0, greenlet 3.5.1,
  bjoern 3.2.2, redis 8.0.0, requests 2.34.2, sentry-sdk 2.61.1,
  urllib3 2.7.0 and friends
- flask_sockets.py: import parse_cookie from werkzeug.sansio.http
  (removed from werkzeug.http in Werkzeug 2.3+)

python-fastapi:
- Base image 3.13-alpine; fastapi 0.114.0 -> 0.136.3,
  uvicorn 0.30.6 -> 0.49.0

CI:
- Fix python job gate (contains was missing .packages, so the job
  never triggered); exact-match quotes to stop python-fastapi changes
  cross-triggering the python job (hunks mirror #436)
- setup-python @v2 -> @v6, python-version 3.13 in both python jobs

envconfig version 1.35.0 for both; environments.json regenerated.

Verified locally on python 3.13: full dependency install (bjoern
compiles), server in bjoern mode (all HTTP methods), GEVENT mode
(flask_sockets path) and fastapi server all pass healthz/specialize/
invoke; env + builder images build on 3.13-alpine.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sanketsudake sanketsudake merged commit 040995c into master Jun 6, 2026
15 checks passed
@sanketsudake sanketsudake deleted the python-updates branch June 6, 2026 16:09
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.

1 participant