Update dependency fastapi to >=0.121.0,<0.122.0
This PR contains the following updates:
| Package | Change | Age | Confidence |
|---|---|---|---|
| fastapi (changelog) | >=0.115.2,<0.117.0 -> >=0.121.0,<0.122.0 |
Release Notes
fastapi/fastapi (fastapi)
v0.121.0
Features
- ✨ Add support for dependencies with scopes, support
scope="request"for dependencies withyieldthat exit before the response is sent. PR #14262 by @tiangolo.
Internal
- 👥 Update FastAPI People - Contributors and Translators. PR #14273 by @tiangolo.
- 👥 Update FastAPI People - Sponsors. PR #14274 by @tiangolo.
- 👥 Update FastAPI GitHub topic repositories. PR #14280 by @tiangolo.
- ⬆ Bump mkdocs-macros-plugin from 1.4.0 to 1.4.1. PR #14277 by @dependabot[bot].
- ⬆ Bump mkdocstrings[python] from 0.26.1 to 0.30.1. PR #14279 by @dependabot[bot].
v0.120.4
Fixes
- 🐛 Fix security schemes in OpenAPI when added at the top level app. PR #14266 by @YuriiMotov.
v0.120.3
Refactors
- ♻️ Reduce internal cyclic recursion in dependencies, from 2 functions calling each other to 1 calling itself. PR #14256 by @tiangolo.
- ♻️ Refactor internals of dependencies, simplify code and remove
get_param_sub_dependant. PR #14255 by @tiangolo. - ♻️ Refactor internals of dependencies, simplify using dataclasses. PR #14254 by @tiangolo.
Docs
- 📝 Update note for untranslated pages. PR #14257 by @YuriiMotov.
v0.120.2
Fixes
- 🐛 Fix separation of schemas with nested models introduced in 0.119.0. PR #14246 by @tiangolo.
Internal
- 🔧 Add sponsor: SerpApi. PR #14248 by @tiangolo.
- ⬆ Bump actions/download-artifact from 5 to 6. PR #14236 by @dependabot[bot].
- ⬆ [pre-commit.ci] pre-commit autoupdate. PR #14237 by @pre-commit-ci[bot].
- ⬆ Bump actions/upload-artifact from 4 to 5. PR #14235 by @dependabot[bot].
v0.120.1
Upgrades
- ⬆️ Bump Starlette to <
0.50.0. PR #14234 by @YuriiMotov.
Internal
- 🔧 Add
licenseandlicense-filestopyproject.toml, removeLicensefromclassifiers. PR #14230 by @YuriiMotov.
v0.120.0
There are no major nor breaking changes in this release. ☕️
The internal reference documentation now uses annotated_doc.Doc instead of typing_extensions.Doc, this adds a new (very small) dependency on annotated-doc, a package made just to provide that Doc documentation utility class.
I would expect typing_extensions.Doc to be deprecated and then removed at some point from typing_extensions, for that reason there's the new annotated-doc micro-package. If you are curious about this, you can read more in the repo for annotated-doc.
This new version 0.120.0 only contains that transition to the new home package for that utility class Doc.
Translations
- 🌐 Sync German docs. PR #14188 by @nilslindemann.
Internal
- ➕ Migrate internal reference documentation from
typing_extensions.Doctoannotated_doc.Doc. PR #14222 by @tiangolo. - 🛠️ Update German LLM prompt and test file. PR #14189 by @nilslindemann.
- ⬆ [pre-commit.ci] pre-commit autoupdate. PR #14181 by @pre-commit-ci[bot].
v0.119.1
Fixes
- 🐛 Fix internal Pydantic v1 compatibility (warnings) for Python 3.14 and Pydantic 2.12.1. PR #14186 by @svlandeg.
Docs
Internal
- 🔧 Add sponsor Requestly. PR #14205 by @tiangolo.
- 🔧 Configure reminder for
waitinglabel inissue-manager. PR #14156 by @YuriiMotov.
v0.119.0
FastAPI now (temporarily) supports both Pydantic v2 models and pydantic.v1 models 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.
from fastapi import FastAPI
from pydantic import BaseModel as BaseModelV2
from pydantic.v1 import BaseModel
class Item(BaseModel):
name: str
description: str | None = None
class ItemV2(BaseModelV2):
title: str
summary: str | None = None
app = FastAPI()
@​app.post("/items/", response_model=ItemV2)
def create_item(item: Item):
return {"title": item.name, "summary": item.description}
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
- ✨ Add support for
from pydantic.v1 import BaseModel, mixed Pydantic v1 and v2 models in the same app. PR #14168 by @tiangolo.
v0.118.3
Upgrades
- ⬆️ Add support for Python 3.14. PR #14165 by @svlandeg.
v0.118.2
Fixes
- 🐛 Fix tagged discriminated union not recognized as body field. PR #12942 by @frankie567.
Internal
- ⬆ Bump astral-sh/setup-uv from 6 to 7. PR #14167 by @dependabot[bot].
v0.118.1
Upgrades
- 👽️ Ensure compatibility with Pydantic 2.12.0. PR #14036 by @cjwatson.
Docs
- 📝 Add External Link: Getting started with logging in FastAPI. PR #14152 by @itssimon.
Translations
- 🔨 Add Russian translations LLM prompt. PR #13936 by @tiangolo.
- 🌐 Sync German docs. PR #14149 by @nilslindemann.
- 🌐 Add Russian translations for missing pages (LLM-generated). PR #14135 by @YuriiMotov.
- 🌐 Update Russian translations for existing pages (LLM-generated). PR #14123 by @YuriiMotov.
- 🌐 Remove configuration files for inactive translations. PR #14130 by @tiangolo.
Internal
- 🔨 Move local coverage logic to its own script. PR #14166 by @tiangolo.
- ⬆ [pre-commit.ci] pre-commit autoupdate. PR #14161 by @pre-commit-ci[bot].
- ⬆ Bump griffe-typingdoc from 0.2.8 to 0.2.9. PR #14144 by @dependabot[bot].
- ⬆ Bump mkdocs-macros-plugin from 1.3.9 to 1.4.0. PR #14145 by @dependabot[bot].
- ⬆ Bump markdown-include-variants from 0.0.4 to 0.0.5. PR #14146 by @dependabot[bot].
- ⬆ [pre-commit.ci] pre-commit autoupdate. PR #14126 by @pre-commit-ci[bot].
- 👥 Update FastAPI GitHub topic repositories. PR #14150 by @tiangolo.
- 👥 Update FastAPI People - Sponsors. PR #14139 by @tiangolo.
- 👥 Update FastAPI People - Contributors and Translators. PR #14138 by @tiangolo.
- ⬆ Bump ruff from 0.12.7 to 0.13.2. PR #14147 by @dependabot[bot].
- ⬆ Bump sqlmodel from 0.0.24 to 0.0.25. PR #14143 by @dependabot[bot].
- ⬆ Bump tiangolo/issue-manager from 0.5.1 to 0.6.0. PR #14148 by @dependabot[bot].
- 👷 Update docs previews comment, single comment, add failure status. PR #14129 by @tiangolo.
- 🔨 Modify
mkdocs_hooks.pyto addtitleto page's metadata (remove permalinks in social cards). PR #14125 by @YuriiMotov.
v0.118.0
0.118.0
Fixes
- 🐛 Fix support for
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 with yield would have been already run.
For example, if you had a database session in a dependency with yield, the StreamingResponse would not be able to use that session while streaming data because the session would have already been closed in the exit code after yield.
This behavior was reverted in 0.118.0, to make the exit code after yield be executed after the response is sent.
You can read more about it in the docs for Advanced Dependencies - Dependencies with yield, HTTPException, except and Background Tasks. Including what you could do if you wanted to close a database session earlier, before returning the response to the client.
Docs
- 📝 Update
tutorial/security/oauth2-jwt/to usepwdlibwith Argon2 instead ofpasslib. PR #13917 by @Neizvestnyj. - ✏️ Fix typos in OAuth2 password request forms. PR #14112 by @alv2017.
- 📝 Update contributing guidelines for installing requirements. PR #14095 by @alejsdev.
Translations
- 🌐 Sync German docs. PR #14098 by @nilslindemann.
Internal
- ⬆ [pre-commit.ci] pre-commit autoupdate. PR #14103 by @pre-commit-ci[bot].
- ♻️ Refactor sponsor image handling. PR #14102 by @alejsdev.
- 🐛 Fix sponsor display issue by hiding element on image error. PR #14097 by @alejsdev.
- 🐛 Hide sponsor badge when sponsor image is not displayed. PR #14096 by @alejsdev.
v0.117.1
Fixes
- 🐛 Fix validation error when
Fileis declared afterFormparameter. PR #11194 by @thomasleveil.
v0.117.0
Features
- ✨ Allow
Noneas return type for bodiless responses. PR #9425 by @hofrob. - ✨ Allow array values for OpenAPI schema
typefield. PR #13639 by @sammasak. - ✨ Add OpenAPI
external_docsparameter toFastAPI. PR #13713 by @cmtoro.
Fixes
- ⚡️ Fix
default_factoryfor response model field with Pydantic V1. PR #9704 by @vvanglro. - 🐛 Fix inconsistent processing of model docstring formfeed char with Pydantic V1. PR #6039 by @MaxwellPayne.
- 🐛 Fix
jsonable_encoderaltersjson_encodersof Pydantic v1 objects. PR #4972 by @aboubacs. - 🐛 Reenable
allow_arbitrary_typeswhen only 1 argument is used on the API endpoint. PR #13694 by @rmawatson. - 🐛 Fix
inspect.getcoroutinefunction()can break testing withunittest.mock.patch(). PR #14022 by @secrett2633.
Refactors
- ♻️ Create
dependency-cachedict insolve_dependenciesonly ifNone(don't re-create if empty). PR #13689 by @bokshitsky. - ✅ Enable test case for duplicated headers in
test_tutorial/test_header_params/test_tutorial003.py. PR #13864 by @Amogha-ark. - 📌 Pin
httpxto>=0.23.0,<1.0.0. PR #14086 by @YuriiMotov.
Docs
- 📝 Add note about Cookies and JavaScript on
tutorial/cookie-params.md. PR #13510 by @Kludex. - 📝 Remove outdated formatting from
path-params-numeric-validations.mdfor languagesen,esanduk.. PR #14059 by @svlandeg. - 📝 Fix and Improve English Documentation. PR #14048 by @nilslindemann.
Translations
- 📝 Update prompts and German translation. PR #14015 by @nilslindemann.
Internal
- ✅ Simplify tests for response_model. PR #14062 by @dynamicy.
- 🚨 Install pydantic.mypy plugin. PR #14081 by @svlandeg.
- ✅ Add LLM test file. PR #14049 by @nilslindemann.
- 🔨 Update translations script. PR #13968 by @YuriiMotov.
- 🛠️ Update
docs.py generate-readmecommand to remove permalinks from headers. PR #14055 by @YuriiMotov. - ⬆️ Update mypy to 1.14.1. PR #12970 by @tamird.
Configuration
📅 Schedule: Branch creation - "after 10pm every weekday,every weekend,before 5am every weekday" in timezone Europe/Paris, 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.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.