Skip to content

fix(deps): update dependency fastapi to ^0.94.0 - autoclosed

renovate requested to merge renovate/fastapi-0.x into master

This MR contains the following updates:

Package Change Age Adoption Passing Confidence
fastapi ^0.92.0 -> ^0.94.0 age adoption passing confidence

Release Notes

tiangolo/fastapi

v0.94.1

Compare Source

Fixes

v0.94.0

Compare Source

Upgrades
Docs
Translations
  • 🌐 Add Russian translation for docs/ru/docs/history-design-future.md. MR #​5986 by @​Xewus.
Internal

v0.93.0

Compare Source

Features
  • Add support for lifespan async context managers (superseding startup and shutdown events). Initial MR #​2944 by @​uSpike.

Now, instead of using independent startup and shutdown events, you can define that logic in a single function with yield decorated with @asynccontextmanager (an async context manager).

For example:

from contextlib import asynccontextmanager

from fastapi import FastAPI

def fake_answer_to_everything_ml_model(x: float):
    return x * 42

ml_models = {}

@​asynccontextmanager
async 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"](x)
    return {"result": result}

Note: This is the recommended way going forward, instead of using startup and shutdown events.

Read more about it in the new docs: Advanced User Guide: Lifespan Events.

Docs
  • Fix formatting in docs/en/docs/tutorial/metadata.md for ReDoc. MR #​6005 by @​eykamp.
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 MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

Edited by renovate

Merge request reports