⬆️ Bump fastapi[all] from 0.88.0 to 0.93.0
Bumps fastapi[all] from 0.88.0 to 0.93.0.
Release notes
Sourced from fastapi[all]'s releases.
0.93.0
Features
- ✨ Add support for
lifespanasync context managers (supersedingstartupandshutdownevents). Initial PR #2944 by@uSpike.Now, instead of using independent
startupandshutdownevents, you can define that logic in a single function withyielddecorated with@asynccontextmanager(an async context manager).For example:
from contextlib import asynccontextmanagerfrom fastapi import FastAPI
def fake_answer_to_everything_ml_model(x: float): return x * 42
ml_models = {}
@asynccontextmanagerasync def lifespan(app: FastAPI): # Load the ML model ml_models["answer_to_everything"] = fake_answer_to_everything_ml_model yield # Clean up the ML models and release the resources ml_models.clear()app = FastAPI(lifespan=lifespan)
@app.get("/predict") async def predict(x: float): result = ml_models"answer_to_everything" return {"result": result}Note: This is the recommended way going forward, instead of using
startupandshutdownevents.Read more about it in the new docs: Advanced User Guide: Lifespan Events.
Docs
Translations
... (truncated)
Commits
25382d2🔖 Release version 0.93.0b9bb441📝 Update release notese33f30a📝 Update release notescc9a73c✨ Add support forlifespanasync context managers (supersedingstartupan...66e03c8📝 Update release notes639cf34🌐 Tamil translations - initial setup (#5564)2f1b856📝 Update release notes31e148b🌐 Add French translation for `docs/fr/docs/advanced/path-operation-advanced-c...40c2c44📝 Update release notesc5f72f0🌐 Add French translation fordocs/tutorial/debugging.md(#9175)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
@tiangolo , @Kludex , @graue70 , @shelbylsmith can this PR be merged?
@tiangolo, @Kludex, @graue70, @shelbylsmith Just a friendly reminder, FastAPI has had support for Pydantic 2 since July 7.
It would be nice to re-run this dependabot and get the docker container to run version 0.100.0 or above for FastAPI.
Superseded by #271.