Repository navigation
fix(python-fastapi): update requirements for Python 3.14 support - #24790
Merged
wing328 merged 1 commit intoAug 27, 2026
Merged
Conversation
Bump typing-extensions to 4.16.0, httptools upper bound to <0.9.0, orjson to 3.12.0, uvloop to 0.22.1 and MarkupSafe to 3.0.3 so that the generated FastAPI server installs from prebuilt wheels on Python 3.14 (drops the old pyo3-based pydantic-core fallback that failed to compile). Fixes OpenAPITools#24788.
Member
|
thanks for the contribution, which has been merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the python-fastapi generator's
requirements.txttemplate so the generated FastAPI server installs cleanly on Python 3.14.Root cause: the template pins
typing-extensions==4.13.2. Modernpydantic(2.13.x) requirestyping-extensions>=4.14.1, so pip is forced to resolve an olderpydantic, whosepydantic-corehas no CPython 3.14 wheel — pip then tries to build it from source with an old PyO3 (0.24.1) that rejects Python 3.14, failing thepip installin Docker.Changes (5 lines):
typing-extensions4.13.2→4.16.0— unlocks pydantic ≥ 2.13 (itspydantic-coreships a cp314 wheel)httptoolsupper bound<0.7.0→<0.9.0— 0.7.1+/0.8.0 ship cp314 wheels (0.6.x has none)uvloop0.21.0→0.22.1— first release with cp314 wheelsMarkupSafe2.0.1→3.0.3— first with cp314 wheels (2.0.1 has none)orjson3.11.6→3.12.0— newer wheel coverage (3.11.6 already has cp314)All upgraded packages still provide CPython 3.10 wheels (the sample CI matrix), verified via pip dry-run against the 3.10 and 3.14 manylinux targets; the local install + import smoke test on 3.11 passes (fastapi TestClient, pydantic 2.13.4, jinja2/markupsafe, httptools/orjson/uvloop).
Fixes #24788.
Summary by cubic
Updates the python-fastapi generator's
requirements.mustacheand samplerequirements.txtso the generated FastAPI server installs cleanly on Python 3.14. The old pins forced pip to resolve an olderpydanticwhosepydantic-corehas no CPython 3.14 wheel, so pip tried to build it from source and failed.typing-extensionsto 4.16.0 unlockspydantic≥ 2.13, which ships CPython 3.14 wheels.httptools,uvloop,MarkupSafe, andorjsonto versions with CPython 3.14 wheels.Written for commit 0690fa6. Summary will update on new commits.