Skip to content

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 29, 2025

This PR contains the following updates:

Package Change Age Confidence
fastapi (changelog) 0.117.1 -> 0.119.0 age confidence

Release Notes

fastapi/fastapi (fastapi)

v0.119.0

Compare Source

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

Compare Source

Upgrades

v0.118.2

Compare Source

Fixes
Internal

v0.118.1

Compare Source

Upgrades
Docs
Translations
Internal

v0.118.0

Compare Source

0.118.0

Fixes
  • 🐛 Fix support for StreamingResponses with dependencies with yield or UploadFiles, 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
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 PR is behind base branch, 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.

@renovate renovate bot changed the title Update dependency fastapi to v0.118.0 Update dependency fastapi to v0.118.1 Oct 8, 2025
@renovate renovate bot force-pushed the renovate/fastapi-0.x-lockfile branch 2 times, most recently from 1b91e3b to 5710190 Compare October 8, 2025 16:46
@renovate renovate bot changed the title Update dependency fastapi to v0.118.1 Update dependency fastapi to v0.118.2 Oct 8, 2025
@renovate renovate bot force-pushed the renovate/fastapi-0.x-lockfile branch from 5710190 to f29fcff Compare October 10, 2025 10:58
@renovate renovate bot changed the title Update dependency fastapi to v0.118.2 Update dependency fastapi to v0.118.3 Oct 10, 2025
@renovate renovate bot force-pushed the renovate/fastapi-0.x-lockfile branch from f29fcff to fad94cd Compare October 11, 2025 18:27
@renovate renovate bot changed the title Update dependency fastapi to v0.118.3 Update dependency fastapi to v0.119.0 Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants