fix(deps): update dependency fastapi to ^0.109.0 #148
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.103
->^0.109.0
Release Notes
tiangolo/fastapi (fastapi)
v0.109.0
Compare Source
Features
Upgrades
Docs
docs/en/docs/alternatives.md
. PR #10931 by @s111d.email
withusername
indocs_src/security/tutorial007
code examples. PR #10649 by @nilslindemann..model_dump()
. PR #10929 by @tiangolo.docs/en/docs/tutorial/sql-databases.md
. PR #10765 by @HurSungYun.docs/en/docs/alternatives.md
anddocs/en/docs/tutorial/dependencies/index.md
. PR #10906 by @s111d.docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
. PR #10834 by @Molkree.AsyncClient
. PR #4167 by @andrew-chang-dewitt./docs/reference/exceptions.md
and/en/docs/reference/status.md
. PR #10809 by @clarencepenz.openapi-callbacks.md
. PR #10673 by @kayjan.fastapi/routing.py
. PR #10520 by @sepsh.create_item
withupdate_item
when appropriate. PR #5913 by @OttoAndrey.Translations
docs/bn/docs/index.md
. PR #9177 by @Fahad-Md-Kamal.index.md
in several languages. PR #10711 by @tamago3keran.docs/ru/docs/tutorial/request-forms-and-files.md
. PR #10347 by @AlertRED.docs/uk/docs/index.md
. PR #10362 by @rostik1410.docs/ko/docs/index.md
. PR #10680 by @Eeap.docs/fa/docs/features.md
. PR #5887 by @amirilf.docs/zh/docs/advanced/additional-responses.md
. PR #10325 by @ShuibeiC.docs/ru/docs/tutorial/background-tasks.md
,docs/ru/docs/tutorial/body-nested-models.md
,docs/ru/docs/tutorial/debugging.md
,docs/ru/docs/tutorial/testing.md
. PR #10311 by @AlertRED.docs/ru/docs/tutorial/request-files.md
. PR #10332 by @AlertRED.docs/zh/docs/deployment/server-workers.md
. PR #10292 by @xzmeng.docs/zh/docs/deployment/cloud.md
. PR #10291 by @xzmeng.docs/zh/docs/deployment/manually.md
. PR #10279 by @xzmeng.docs/zh/docs/deployment/https.md
. PR #10277 by @xzmeng.docs/zh/docs/deployment/index.md
. PR #10275 by @xzmeng.docs/de/docs/tutorial/first-steps.md
. PR #9530 by @fhabers21.docs/tr/docs/index.md
. PR #10444 by @hasansezertasan.docs/zh/docs/learn/index.md
. PR #10479 by @KAZAMA-DREAM.docs/ru/docs/learn/index.md
. PR #10539 by @AlertRED.docs/zh/docs/tutorial/sql-databases.md
. PR #9712 by @Royc30ne.docs/tr/docs/external-links.md
. PR #10549 by @hasansezertasan.docs/es/docs/learn/index.md
. PR #10885 by @pablocm83.docs/uk/docs/tutorial/body-fields.md
. PR #10670 by @ArtemKhymenko./docs/hu/docs/index.md
. PR #10812 by @takacs.docs/tr/docs/newsletter.md
. PR #10550 by @hasansezertasan.docs/es/docs/help/index.md
. PR #10907 by @pablocm83.docs/es/docs/about/index.md
. PR #10908 by @pablocm83.docs/es/docs/resources/index.md
. PR #10909 by @pablocm83.Internal
v0.108.0
Compare Source
Upgrades
>=0.29.0,<0.33.0
, update docs and usage of templates with new Starlette arguments. PR #10846 by @tiangolo.v0.107.0
Compare Source
Upgrades
Docs
v0.106.0
Compare Source
Breaking Changes
Using resources from dependencies with
yield
in background tasks is no longer supported.This change is what supports the new features, read below. 🤓
Dependencies with
yield
,HTTPException
and Background TasksDependencies with
yield
now can raiseHTTPException
and other exceptions afteryield
. 🎉Read the new docs here: Dependencies with
yield
andHTTPException
.Before FastAPI 0.106.0, raising exceptions after
yield
was not possible, the exit code in dependencies withyield
was executed after the response was sent, so Exception Handlers would have already run.This was designed this way mainly to allow using the same objects "yielded" by dependencies inside of background tasks, because the exit code would be executed after the background tasks were finished.
Nevertheless, as this would mean waiting for the response to travel through the network while unnecessarily holding a resource in a dependency with yield (for example a database connection), this was changed in FastAPI 0.106.0.
Additionally, a background task is normally an independent set of logic that should be handled separately, with its own resources (e.g. its own database connection).
If you used to rely on this behavior, now you should create the resources for background tasks inside the background task itself, and use internally only data that doesn't depend on the resources of dependencies with
yield
.For example, instead of using the same database session, you would create a new database session inside of the background task, and you would obtain the objects from the database using this new session. And then instead of passing the object from the database as a parameter to the background task function, you would pass the ID of that object and then obtain the object again inside the background task function.
The sequence of execution before FastAPI 0.106.0 was like the diagram in the Release Notes for FastAPI 0.106.0.
The new execution flow can be found in the docs: Execution of dependencies with
yield
.v0.105.0
Compare Source
Features
Annotated[str, Field(), Query()]
. PR #10773 by @tiangolo.Refactors
Docs
Internal
v0.104.1
Compare Source
Fixes
Docs
docs/en/docs/tutorial/metadata.md
. PR #10433 by @worldworm.docs/en/docs/tutorial/path-params.md
. PR #10043 by @giuliowaitforitdavide.docs/en/docs/reference/dependencies.md
. PR #10465 by @suravshresth.docs/en/docs/tutorial/body-nested-models.md
. PR #10468 by @yogabonito.pydantic.Required
indocs/en/docs/tutorial/query-params-str-validations.md
. PR #10469 by @yogabonito.docs/en/docs/reference/index.md
. PR #10467 by @tarsil.Internal
docs/en/docs/async.md
anddocs/zh/docs/async.md
to make them relative. PR #10498 by @hasnatsajid.docs/em/docs/async.md
. PR #10507 by @hasnatsajid.docs/em/docs/index.md
, Python 3.8. PR #10521 by @kerriop.CITATION.cff
file for academic citations. PR #10496 by @tiangolo.v0.104.0
Compare Source
Features
BackgroundTasks
, refactor docs structure. PR #10392 by @tiangolo. New docs at FastAPI Reference - Code API.Upgrades
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 becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.