Update dependency fastapi to >=0.120.0, <0.121.0 #75
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.
This PR contains the following updates:
>=0.110.0, <0.120.0->>=0.120.0, <0.121.0Release Notes
fastapi/fastapi (fastapi)
v0.120.0Compare Source
There are no major nor breaking changes in this release. ☕️
The internal reference documentation now uses
annotated_doc.Docinstead oftyping_extensions.Doc, this adds a new (very small) dependency onannotated-doc, a package made just to provide thatDocdocumentation utility class.I would expect
typing_extensions.Docto be deprecated and then removed at some point fromtyping_extensions, for that reason there's the newannotated-docmicro-package. If you are curious about this, you can read more in the repo forannotated-doc.This new version
0.120.0only contains that transition to the new home package for that utility classDoc.Translations
Internal
typing_extensions.Doctoannotated_doc.Doc. PR #14222 by @tiangolo.v0.119.1Compare Source
Fixes
Docs
starlette.iobystarlette.devanduvicorn.orgbyuvicorn.dev. PR #14176 by @Kludex.Internal
waitinglabel inissue-manager. PR #14156 by @YuriiMotov.v0.119.0Compare Source
FastAPI now (temporarily) supports both Pydantic v2 models and
pydantic.v1models at the same time in the same app, to make it easier for any FastAPI apps still using Pydantic v1 to gradually but quickly migrate to Pydantic v2.Adding this feature was a big effort with the main objective of making it easier for the few applications still stuck in Pydantic v1 to migrate to Pydantic v2.
And with this, support for Pydantic v1 is now deprecated and will be removed from FastAPI in a future version soon.
Note: have in mind that the Pydantic team already stopped supporting Pydantic v1 for recent versions of Python, starting with Python 3.14.
You can read in the docs more about how to Migrate from Pydantic v1 to Pydantic v2.
Features
from pydantic.v1 import BaseModel, mixed Pydantic v1 and v2 models in the same app. PR #14168 by @tiangolo.v0.118.3Compare Source
Upgrades
v0.118.2Compare Source
Fixes
Internal
v0.118.1Compare Source
Upgrades
Docs
Translations
Internal
mkdocs_hooks.pyto addtitleto page's metadata (remove permalinks in social cards). PR #14125 by @YuriiMotov.v0.118.0Compare Source
0.118.0
Fixes
StreamingResponses with dependencies withyieldorUploadFiles, close after the response is done. PR #14099 by @tiangolo.Before FastAPI 0.118.0, if you used a dependency with
yield, it would run the exit code after the path operation function returned but right before sending the response.This change also meant that if you returned a
StreamingResponse, the exit code of the dependency withyieldwould have been already run.For example, if you had a database session in a dependency with
yield, theStreamingResponsewould not be able to use that session while streaming data because the session would have already been closed in the exit code afteryield.This behavior was reverted in 0.118.0, to make the exit code after
yieldbe executed after the response is sent.You can read more about it in the docs for Advanced Dependencies - Dependencies with
yield,HTTPException,exceptand Background Tasks. Including what you could do if you wanted to close a database session earlier, before returning the response to the client.Docs
tutorial/security/oauth2-jwt/to usepwdlibwith Argon2 instead ofpasslib. PR #13917 by @Neizvestnyj.Translations
Internal
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.