Bump fastapi from 0.115.12 to 0.119.0
Type: Pull Request
State: Closed
Association: Unknown
Comments: 1
(3 months ago)
(2 months ago)
(2 months ago)
dependencies python
Bumps fastapi from 0.115.12 to 0.119.0.
Release notes
Sourced from fastapi's releases.
0.119.0
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.from fastapi import FastAPI from pydantic import BaseModel as BaseModelV2 from pydantic.v1 import BaseModelclass Item(BaseModel):
name: str
description: str | None = Noneclass ItemV2(BaseModelV2):
title: str
summary: str | None = Noneapp = 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.0.118.3
Upgrades
- ⬆️ Add support for Python 3.14. PR #14165 by
@svlandeg.0.118.2
Fixes
- 🐛 Fix tagged discriminated union not recognized as body field. PR #12942 by
@frankie567.Internal
... (truncated)
Commits
2e721e1🔖 Release version 0.119.0fc7a068📝 Update release notes3a3879b📝 Update release notesd34918a✨ Add support forfrom pydantic.v1 import BaseModel, mixed Pydantic v1 and ...352dbef🔖 Release version 0.118.396e7d6e📝 Update release notes3611c3f⬆️ Add support for Python 3.14 (#14165)942fce3🔖 Release version 0.118.213b067c📝 Update release notes185cecd🐛 Fix tagged discriminated union not recognized as body field (#12942)- 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 show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@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)
Package Dependencies
Technical Details
| ID: | 10386994 |
| UUID: | 3511751168 |
| Node ID: | PR_kwDOBjX6Ks6tjdhJ |
| Host: | GitHub |
| Repository: | python-openapi/openapi-core |