Update dependency fastapi to v0.109.2 #3

Merged
marco merged 1 commits from renovate/fastapi-0.x into main 2024-02-18 17:19:48 +00:00
Member

This PR contains the following updates:

Package Update Change
fastapi minor ==0.68.2 -> ==0.109.2

Release Notes

tiangolo/fastapi (fastapi)

v0.109.2

Compare Source

Upgrades
Translations
Internal

v0.109.1

Compare Source

Security fixes
  • ⬆️ Upgrade minimum version of python-multipart to >=0.0.7 to fix a vulnerability when using form data with a ReDos attack. You can also simply upgrade python-multipart.

Read more in the advisory: Content-Type Header ReDoS.

Features
Refactors
  • Refactor tests for duplicate operation ID generation for compatibility with other tools running the FastAPI test suite. PR #​10876 by @​emmettbutler.
  • ♻️ Simplify string format with f-strings in fastapi/utils.py. PR #​10576 by @​eukub.
  • 🔧 Fix Ruff configuration unintentionally enabling and re-disabling mccabe complexity check. PR #​10893 by @​jiridanek.
  • Re-enable test in tests/test_tutorial/test_header_params/test_tutorial003.py after fix in Starlette. PR #​10904 by @​ooknimm.
Docs
Translations
Internal

v0.109.0

Compare Source

Features
Upgrades
Docs
Translations
Internal

v0.108.0

Compare Source

Upgrades
  • ⬆️ Upgrade Starlette to >=0.29.0,<0.33.0, update docs and usage of templates with new Starlette arguments. PR #​10846 by @​tiangolo.

v0.107.0

Compare Source

Upgrades
Docs

v0.106.0

Compare Source

Breaking Changes

Using resources from dependencies with yield in background tasks is no longer supported.

This change is what supports the new features, read below. 🤓

Dependencies with yield, HTTPException and Background Tasks

Dependencies with yield now can raise HTTPException and other exceptions after yield. 🎉

Read the new docs here: Dependencies with yield and HTTPException.

from fastapi import Depends, FastAPI, HTTPException
from typing_extensions import Annotated

app = FastAPI()

data = {
    "plumbus": {"description": "Freshly pickled plumbus", "owner": "Morty"},
    "portal-gun": {"description": "Gun to create portals", "owner": "Rick"},
}

class OwnerError(Exception):
    pass

def get_username():
    try:
        yield "Rick"
    except OwnerError as e:
        raise HTTPException(status_code=400, detail=f"Onwer error: {e}")

@&#8203;app.get("/items/{item_id}")
def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
    if item_id not in data:
        raise HTTPException(status_code=404, detail="Item not found")
    item = data[item_id]
    if item["owner"] != username:
        raise OwnerError(username)
    return item

Before FastAPI 0.106.0, raising exceptions after yield was not possible, the exit code in dependencies with yield was executed after the response was sent, so Exception Handlers would have already run.

This was designed this way mainly to allow using the same objects "yielded" by dependencies inside of background tasks, because the exit code would be executed after the background tasks were finished.

Nevertheless, as this would mean waiting for the response to travel through the network while unnecessarily holding a resource in a dependency with yield (for example a database connection), this was changed in FastAPI 0.106.0.

Additionally, a background task is normally an independent set of logic that should be handled separately, with its own resources (e.g. its own database connection).

If you used to rely on this behavior, now you should create the resources for background tasks inside the background task itself, and use internally only data that doesn't depend on the resources of dependencies with yield.

For example, instead of using the same database session, you would create a new database session inside of the background task, and you would obtain the objects from the database using this new session. And then instead of passing the object from the database as a parameter to the background task function, you would pass the ID of that object and then obtain the object again inside the background task function.

The sequence of execution before FastAPI 0.106.0 was like the diagram in the Release Notes for FastAPI 0.106.0.

The new execution flow can be found in the docs: Execution of dependencies with yield.

v0.105.0

Compare Source

Features
  • Add support for multiple Annotated annotations, e.g. Annotated[str, Field(), Query()]. PR #​10773 by @​tiangolo.
Refactors
Docs
Internal

v0.104.1

Compare Source

Fixes
  • 📌 Pin Swagger UI version to 5.9.0 temporarily to handle a bug crashing it in 5.9.1. PR #​10529 by @​alejandraklachquin.
    • This is not really a bug in FastAPI but in Swagger UI, nevertheless pinning the version will work while a solution is found on the Swagger UI side.
Docs
Internal

v0.104.0

Compare Source

Features

Upgrades

Internal

v0.103.2

Compare Source

Refactors
  • ⬆️ Upgrade compatibility with Pydantic v2.4, new renamed functions and JSON Schema input/output models with default values. PR #​10344 by @​tiangolo.
Translations
  • 🌐 Add Ukrainian translation for docs/uk/docs/tutorial/extra-data-types.md. PR #​10132 by @​ArtemKhymenko.
  • 🌐 Fix typos in French translations for docs/fr/docs/advanced/path-operation-advanced-configuration.md, docs/fr/docs/alternatives.md, docs/fr/docs/async.md, docs/fr/docs/features.md, docs/fr/docs/help-fastapi.md, docs/fr/docs/index.md, docs/fr/docs/python-types.md, docs/fr/docs/tutorial/body.md, docs/fr/docs/tutorial/first-steps.md, docs/fr/docs/tutorial/query-params.md. PR #​10154 by @​s-rigaud.
  • 🌐 Add Chinese translation for docs/zh/docs/async.md. PR #​5591 by @​mkdir700.
  • 🌐 Update Chinese translation for docs/tutorial/security/simple-oauth2.md. PR #​3844 by @​jaystone776.
  • 🌐 Add Korean translation for docs/ko/docs/deployment/cloud.md. PR #​10191 by @​Sion99.
  • 🌐 Add Japanese translation for docs/ja/docs/deployment/https.md. PR #​10298 by @​tamtam-fitness.
  • 🌐 Fix typo in Russian translation for docs/ru/docs/tutorial/body-fields.md. PR #​10224 by @​AlertRED.
  • 🌐 Add Polish translation for docs/pl/docs/help-fastapi.md. PR #​10121 by @​romabozhanovgithub.
  • 🌐 Add Russian translation for docs/ru/docs/tutorial/header-params.md. PR #​10226 by @​AlertRED.
  • 🌐 Add Chinese translation for docs/zh/docs/deployment/versions.md. PR #​10276 by @​xzmeng.
Internal

v0.103.1

Compare Source

Fixes
  • 📌 Pin AnyIO to < 4.0.0 to handle an incompatibility while upgrading to Starlette 0.31.1. PR #​10194 by @​tiangolo.
Docs
Translations
Refactors
Internal

v0.103.0

Compare Source

Features
Docs
  • 📝 Add note to docs about Separate Input and Output Schemas with FastAPI version. PR #​10150 by @​tiangolo.

v0.102.0

Compare Source

Features
Refactors
Docs
Internal

v0.101.1

Compare Source

Fixes
  • Add ResponseValidationError printable details, to show up in server error logs. PR #​10078 by @​tiangolo.
Refactors
Docs
Translations
Internal

v0.101.0

Compare Source

Features
  • Enable Pydantic's serialization mode for responses, add support for Pydantic's computed_field, better OpenAPI for response models, proper required attributes, better generated clients. PR #​10011 by @​tiangolo.
Refactors
Upgrades
Translations
Internal

v0.100.1

Compare Source

Fixes
  • 🐛 Replace MultHostUrl to AnyUrl for compatibility with older versions of Pydantic v1. PR #​9852 by @​Kludex.
Docs
  • 📝 Update links for self-hosted Swagger UI, point to v5, for OpenAPI 31.0. PR #​9834 by @​tiangolo.
Translations
Internal

v0.100.0

Compare Source

Support for Pydantic v2

Pydantic version 2 has the core re-written in Rust and includes a lot of improvements and features, for example:

  • Improved correctness in corner cases.
  • Safer types.
  • Better performance and less energy consumption.
  • Better extensibility.
  • etc.

...all this while keeping the same Python API. In most of the cases, for simple models, you can simply upgrade the Pydantic version and get all the benefits. 🚀

In some cases, for pure data validation and processing, you can get performance improvements of 20x or more. This means 2,000% or more. 🤯

When you use FastAPI, there's a lot more going on, processing the request and response, handling dependencies, executing your own code, and particularly, waiting for the network. But you will probably still get some nice performance improvements just from the upgrade.

The focus of this release is compatibility with Pydantic v1 and v2, to make sure your current apps keep working. Later there will be more focus on refactors, correctness, code improvements, and then performance improvements. Some third-party early beta testers that ran benchmarks on the beta releases of FastAPI reported improvements of 2x - 3x. Which is not bad for just doing pip install --upgrade fastapi pydantic. This was not an official benchmark and I didn't check it myself, but it's a good sign.

Migration

Check out the Pydantic migration guide.

For the things that need changes in your Pydantic models, the Pydantic team built bump-pydantic.

A command line tool that will process your code and update most of the things automatically for you. Make sure you have your code in git first, and review each of the changes to make sure everything is correct before committing the changes.

Pydantic v1

This version of FastAPI still supports Pydantic v1. And although Pydantic v1 will be deprecated at some point, ti will still be supported for a while.

This means that you can install the new Pydantic v2, and if something fails, you can install Pydantic v1 while you fix any problems you might have, but having the latest FastAPI.

There are tests for both Pydantic v1 and v2, and test coverage is kept at 100%.

Changes
  • There are new parameter fields supported by Pydantic Field() for:

    • Path()
    • Query()
    • Header()
    • Cookie()
    • Body()
    • Form()
    • File()
  • The new parameter fields are:

    • default_factory
    • alias_priority
    • validation_alias
    • serialization_alias
    • discriminator
    • strict
    • multiple_of
    • allow_inf_nan
    • max_digits
    • decimal_places
    • json_schema_extra

...you can read about them in the Pydantic docs.

  • The parameter regex has been deprecated and replaced by pattern.

  • New Pydantic models use an improved and simplified attribute model_config that takes a simple dict instead of an internal class Config for their configuration.

  • The attribute schema_extra for the internal class Config has been replaced by the key json_schema_extra in the new model_config dict.

  • When you install "fastapi[all]" it now also includes:

  • Now Pydantic Settings is an additional optional package (included in "fastapi[all]"). To use settings you should now import from pydantic_settings import BaseSettings instead of importing from pydantic directly.

  • PR #​9816 by @​tiangolo, included all the work done (in multiple PRs) on the beta branch (main-pv2).

v0.99.1

Compare Source

Fixes
  • 🐛 Fix JSON Schema accepting bools as valid JSON Schemas, e.g. additionalProperties: false. PR #​9781 by @​tiangolo.
Docs

v0.99.0

Compare Source

Note: this is the last release before supporting Pydantic v2. You can try out the beta with support for Pydantic v2 now, a new beta supporting Pydantic v2 with these same changes from this release will be available in the next hours/days. And the final version (0.100.0) with support for Pydantic v2 will be released in the next days (next week).

Now, back to this release (this one doesn't include the beta support for Pydantic v2).

This release has OpenAPI 3.1.0 🎉

Features
  • Add support for OpenAPI 3.1.0. PR #​9770 by @​tiangolo.

    • New support for documenting webhooks, read the new docs here: Advanced User Guide: OpenAPI Webhooks.
    • Upgrade OpenAPI 3.1.0, this uses JSON Schema 2020-12.
    • Upgrade Swagger UI to version 5.x.x, that supports OpenAPI 3.1.0.
    • Updated examples field in Query(), Cookie(), Body(), etc. based on the latest JSON Schema and OpenAPI. Now it takes a list of examples and they are included directly in the JSON Schema, not outside. Read more about it (including the historical technical details) in the updated docs: Tutorial: Declare Request Example Data.
  • Add support for deque objects and children in jsonable_encoder. PR #​9433 by @​cranium.

Docs
Translations
Internal

v0.98.0

Compare Source

Note: please also help me try out the beta with support for Pydantic v2: https://github.com/tiangolo/fastapi/releases/tag/0.100.0-beta1

Now, back to this release (this one doesn't include the beta support for Pydantic v2).

Features
Docs
Translations
Internal

v0.97.0

Compare Source

Features
Refactors
  • ⬆️ Upgrade and fully migrate to Ruff, remove isort, includes a couple of tweaks suggested by the new version of Ruff. PR #​9660 by @​tiangolo.
  • ♻️ Update internal type annotations and upgrade mypy. PR #​9658 by @​tiangolo.
  • ♻️ Simplify AsyncExitStackMiddleware as without Python 3.6 AsyncExitStack is always available. PR #​9657 by @​tiangolo.
Upgrades
Internal
  • 💚 Update CI cache to fix installs when dependencies change. PR #​9659 by @​tiangolo.
  • ⬇️ Separate requirements for development into their own requirements.txt files, they shouldn't be extras. PR #​9655 by @​tiangolo.

v0.96.1

Compare Source

Fixes
Upgrades
  • 📌 Update minimum version of Pydantic to >=1.7.4. This fixes an issue when trying to use an old version of Pydantic. PR #​9567 by @​Kludex.
Refactors
  • ♻ Remove media_type from ORJSONResponse as it's inherited from the parent class. PR #​5805 by @​Kludex.
  • ♻ Instantiate HTTPException only when needed, optimization refactor. PR #​5356 by @​pawamoy.
Docs
  • 🔥 Remove link to Pydantic's benchmark, as it was removed there. PR #​5811 by @​Kludex.
Translations
  • 🌐 Fix spelling in Indonesian translation of docs/id/docs/tutorial/index.md. PR #​5635 by @​purwowd.
  • 🌐 Add Russian translation for docs/ru/docs/tutorial/index.md. PR #​5896 by @​Wilidon.
  • 🌐 Add Chinese translations for docs/zh/docs/advanced/response-change-status-code.md and docs/zh/docs/advanced/response-headers.md. PR #​9544 by @​ChoyeonChern.
  • 🌐 Add Russian translation for docs/ru/docs/tutorial/schema-extra-example.md. PR #​9621 by @​Alexandrhub.
Internal

v0.96.0

Compare Source

Features
  • Update create_cloned_field to use a global cache and improve startup performance. PR #​4645 by @​madkinsz and previous original PR by @​huonw.
Docs
Translations
Internal

v0.95.2

Compare Source

Translations
Internal

v0.95.1

Compare Source

Fixes
Docs
  • 🌐 🔠 📄 🐢 Translate docs to Emoji 🥳 🎉 💥 🤯 🤯. PR #​5385 by @​LeeeeT.
  • 📝 Add notification message warning about old versions of FastAPI not supporting Annotated. PR #​9298 by @​grdworkin.
  • 📝 Fix typo in docs/en/docs/advanced/behind-a-proxy.md. PR #​5681 by @​Leommjr.
  • ✏ Fix wrong import from typing module in Persian translations for docs/fa/docs/index.md. PR #​6083 by @​Kimiaattaei.
  • ✏️ Fix format, remove unnecessary asterisks in docs/en/docs/help-fastapi.md. PR #​9249 by @​armgabrielyan.
  • ✏ Fix typo in docs/en/docs/tutorial/query-params-str-validations.md. PR #​9272 by @​nicornk.
  • ✏ Fix typo/bug in inline code example in docs/en/docs/tutorial/query-params-str-validations.md. PR #​9273 by @​tim-habitat.
  • ✏ Fix typo in docs/en/docs/tutorial/path-params-numeric-validations.md. PR #​9282 by @​aadarsh977.
  • ✏ Fix typo: 'wll' to 'will' in docs/en/docs/tutorial/query-params-str-validations.md. PR #​9380 by @​dasstyxx.
Translations
  • 🌐 Add French translation for docs/fr/docs/advanced/index.md. PR #​5673 by @​axel584.
  • 🌐 Add Portuguese translation for docs/pt/docs/tutorial/body-nested-models.md. PR #​4053 by @​luccasmmg.
  • 🌐 Add Russian translation for docs/ru/docs/alternatives.md. PR #​5994 by @​Xewus.
  • 🌐 Add Portuguese translation for docs/pt/docs/tutorial/extra-models.md. PR #​5912 by @​LorhanSohaky.
  • 🌐 Add Portuguese translation for docs/pt/docs/tutorial/path-operation-configuration.md. PR #​5936 by @​LorhanSohaky.
  • 🌐 Add Russian translation for docs/ru/docs/contributing.md. PR #​6002 by @​stigsanek.
  • 🌐 Add Korean translation for docs/tutorial/dependencies/classes-as-dependencies.md. PR #​9176 by @​sehwan505.
  • 🌐 Add Russian translation for docs/ru/docs/project-generation.md. PR #​9243 by @​Xewus.
  • 🌐 Add French translation for docs/fr/docs/index.md. PR #​9265 by @​frabc.
  • 🌐 Add Russian translation for docs/ru/docs/tutorial/query-params-str-validations.md. PR #​9267 by @​dedkot01.
  • 🌐 Add Russian translation for docs/ru/docs/benchmarks.md. PR #​9271 by @​Xewus.
Internal

v0.95.0

Compare Source

Highlights

This release adds support for dependencies and parameters using Annotated and recommends its usage.

This has several benefits, one of the main ones is that now the parameters of your functions with Annotated would not be affected at all.

If you call those functions in other places in your code, the actual default values will be kept, your editor will help you notice missing required arguments, Python will require you to pass required arguments at runtime, you will be able to use the same functions for different things and with different libraries (e.g. Typer will soon support Annotated too, then you could use the same function for an API and a CLI), etc.

Because Annotated is standard Python, you still get all the benefits from editors and tools, like autocompletion, inline errors, etc.

One of the biggest benefits is that now you can create Annotated dependencies that are then shared by multiple path operation functions, this will allow you to reduce a lot of code duplication in your codebase, while keeping all the support from editors and tools.

For example, you could have code like this:

def get_current_user(token: str):

### authenticate user
    return User()

@&#8203;app.get("/items/")
def read_items(user: User = Depends(get_current_user)):
    ...

@&#8203;app.post("/items/")
def create_item(*, user: User = Depends(get_current_user), item: Item):
    ...

@&#8203;app.get("/items/{item_id}")
def read_item(*, user: User = Depends(get_current_user), item_id: int):
    ...

@&#8203;app.delete("/items/{item_id}")
def delete_item(*, user: User = Depends(get_current_user), item_id: int):
    ...

There's a bit of code duplication for the dependency:

user: User = Depends(get_current_user)

...the bigger the codebase, the more noticeable it is.

Now you can create an annotated dependency once, like this:

CurrentUser = Annotated[User, Depends(get_current_user)]

And then you can reuse this Annotated dependency:

CurrentUser = Annotated[User, Depends(get_current_user)]

@&#8203;app.get("/items/")
def read_items(user: CurrentUser):
    ...

@&#8203;app.post("/items/")
def create_item(user: CurrentUser, item: Item):
    ...

@&#8203;app.get("/items/{item_id}")
def read_item(user: CurrentUser, item_id: int):
    ...

@&#8203;app.delete("/items/{item_id}")
def delete_item(user: CurrentUser, item_id: int):
    ...

...and CurrentUser has all the typing information as User, so your editor will work as expected (autocompletion and everything), and FastAPI will be able to understand the dependency defined in Annotated. 😎

Roughly all the docs have been rewritten to use Annotated as the main way to declare parameters and dependencies. All the examples in the docs now include a version with Annotated and a version without it, for each of the specific Python versions (when there are small differences/improvements in more recent versions). There were around 23K new lines added between docs, examples, and tests. 🚀

The key updated docs are:

Special thanks to @​nzig for the core implementation and to @​adriangb for the inspiration and idea with Xpresso! 🚀

Features
  • Add support for PEP-593 Annotated for specifying dependencies and parameters. PR #​4871 by @​nzig.
Docs
  • 📝 Tweak tip recommending Annotated in docs. PR #​9270 by @​tiangolo.
  • 📝 Update order of examples, latest Python version first, and simplify version tab names. PR #​9269 by @​tiangolo.
  • 📝 Update all docs to use Annotated as the main recommendation, with new examples and tests. PR #​9268 by @​tiangolo.

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. PR #​5986 by @​Xewus.
Internal

v0.93.0

Compare Source

Features
  • Add support for lifespan async context managers (superseding startup and shutdown events). Initial PR #​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 = {}

@&#8203;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)

@&#8203;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. PR #​6005 by @​eykamp.
Translations
Internal

v0.92.0

Compare Source

🚨 This is a security fix. Please upgrade as soon as possible.

Upgrades
  • ⬆️ Upgrade Starlette to 0.25.0. PR #​5996 by @​tiangolo.
    • This solves a vulnerability that could allow denial of service attacks by using many small multipart fields/files (parts), consuming high CPU and memory.
    • Only applications using forms (e.g. file uploads) could be affected.
    • For most cases, upgrading won't have any breaking changes.

v0.91.0

Compare Source

Upgrades
  • ⬆️ Upgrade Starlette version to 0.24.0 and refactor internals for compatibility. PR #​5985 by @​tiangolo.
    • This can solve nuanced errors when using middlewares. Before Starlette 0.24.0, a new instance of each middleware class would be created when a new middleware was added. That normally was not a problem, unless the middleware class expected to be created only once, with only one instance, that happened in some cases. This upgrade would solve those cases (thanks @​adriangb! Starlette PR #​2017). Now the middleware class instances are created once, right before the first request (the first time the app is called).
    • If you depended on that previous behavior, you might need to update your code. As always, make sure your tests pass before merging the upgrade.

v0.90.1

Compare Source

Upgrades
Docs
Translations
  • 🌐 Add Russian translation for docs/ru/docs/tutorial/cookie-params.md. PR #​5890 by @​bnzone.
Internal

v0.90.0

Compare Source

Upgrades
Docs
Translations
Internal

v0.89.1

Compare Source

Fixes
  • 🐛 Ignore Response classes on return annotation. PR #​5855 by @​Kludex. See the new docs in the PR below.
Docs
Translations

v0.89.0

Compare Source

Features
  • Add support for function return type annotations to declare the response_model. Initial PR #​1436 by @​uriyyo.

Now you can declare the return type / response_model in the function return type annotation:

from fastapi import FastAPI
from pydantic import BaseModel

app = FastAPI()

class Item(BaseModel):
    name: str
    price: float

@&#8203;app.get("/items/")
async def read_items() -> list[Item]:
    return [
        Item(name="Portal Gun", price=42.0),
        Item(name="Plumbus", price=32.0),
    ]

FastAPI will use the return type annotation to perform:

  • Data validation
  • Automatic documentation
    • It could power automatic client generators
  • Data filtering

Before this version it was only supported via the response_model parameter.

Read more about it in the new docs: Response Model - Return Type.

Docs
Translations
Internal

v0.88.0

Compare Source

Upgrades
  • ⬆ Bump Starlette to version 0.22.0 to fix bad encoding for query parameters in new TestClient. PR #​5659 by @​azogue.
Docs
Translations
  • 🌐 Add Portuguese translation for docs/pt/docs/deployment/docker.md. PR #​5663 by @​ayr-ton.
Internal

v0.87.0

Compare Source

Highlights of this release:

  • Upgraded Starlette
    • Now the TestClient is based on HTTPX instead of Requests. 🚀
    • There are some possible breaking changes in the TestClient usage, but @​Kludex built bump-testclient to help you automatize migrating your tests. Make sure you are using Git and that you can undo any unnecessary changes (false positive changes, etc) before using bump-testclient.
  • New WebSocketException (and docs), re-exported from Starlette.
  • Upgraded and relaxed dependencies for package extras all (including new Uvicorn version), when you install "fastapi[all]".
  • New docs about how to Help Maintain FastAPI.
Features
Docs
Translations
  • 🌐 Fix highlight lines for Japanese translation for docs/tutorial/query-params.md. PR #​2969 by @​ftnext.
  • 🌐 Add French translation for docs/fr/docs/advanced/additional-status-code.md. PR #​5477 by @​axel584.
  • 🌐 Add Portuguese translation for docs/pt/docs/tutorial/request-forms-and-files.md. PR #​5579 by @​batlopes.
  • 🌐 Add Japanese translation for docs/ja/docs/advanced/websockets.md. PR #​4983 by @​xryuseix.
Internal

v0.86.0

Compare Source

Features
Fixes
Docs
Translations
Internal

v0.85.2

Compare Source

Note: this release doesn't affect final users, it's mainly internal. It unlocks Pydanitc work with the integration that runs FastAPI's tests in Pydantic's CI.

Docs
Translations
  • 🌐 Add Portuguese translation for docs/pt/docs/tutorial/request-forms.md. PR #​4934 by @​batlopes.
  • 🌐 Add Chinese translation for docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md. PR #​4971 by @​Zssaer.
  • 🌐 Add French translation for deployment/deta.md. PR #​3692 by @​rjNemo.
  • 🌐 Update Chinese translation for docs/zh/docs/tutorial/query-params-str-validations.md. PR #​5255 by @​hjlarry.
  • 🌐 Add Chinese translation for docs/zh/docs/tutorial/sql-databases.md. PR #​4999 by @​Zssaer.
  • 🌐 Add Chinese translation for docs/zh/docs/advanced/wsgi.md. PR #​4505 by @​ASpathfinder.
  • 🌐 Add Portuguese translation for docs/pt/docs/tutorial/body-multiple-params.md. PR #​4111 by @​lbmendes.
  • 🌐 Add Portuguese translation for docs/pt/docs/tutorial/path-params-numeric-validations.md. PR #​4099 by @​lbmendes.
  • 🌐 Add French translation for deployment/versions.md. PR #​3690 by @​rjNemo.
  • 🌐 Add French translation for docs/fr/docs/help-fastapi.md. PR #​2233 by @​JulianMaurin.
  • 🌐 Fix typo in Chinese translation for docs/zh/docs/tutorial/security/first-steps.md. PR #​5530 by @​yuki1sntSnow.
  • 🌐 Add Portuguese translation for docs/pt/docs/tutorial/response-status-code.md. PR #​4922 by @​batlopes.
  • 🔧 Add config for Tamil translations. PR #​5563 by @​tiangolo.
Internal

v0.85.1

Compare Source

Fixes
  • 🐛 Fix support for strings in OpenAPI status codes: default, 1XX, 2XX, 3XX, 4XX, 5XX. PR #​5187 by @​JarroVGIT.
Docs
Internal

v0.85.0

Compare Source

Features
  • ⬆ Upgrade version required of Starlette from 0.19.1 to 0.20.4. Initial PR #​4820 by @​Kludex.
    • This includes several bug fixes in Starlette.
  • ⬆️ Upgrade Uvicorn max version in public extras: all. From >=0.12.0,<0.18.0 to >=0.12.0,<0.19.0. PR #​5401 by @​tiangolo.
Internal
  • ⬆️ Upgrade dependencies for doc and dev internal extras: Typer, Uvicorn. PR #​5400 by @​tiangolo.
  • ⬆️ Upgrade test dependencies: Black, HTTPX, databases, types-ujson. PR #​5399 by @​tiangolo.
  • ⬆️ Upgrade mypy and tweak internal type annotations. PR #​5398 by @​tiangolo.
  • 🔧 Update test dependencies, upgrade Pytest, move dependencies from dev to test. PR #​5396 by @​tiangolo.

v0.84.0

Compare Source

Breaking Changes

This version of FastAPI drops support for Python 3.6. 🔥 Please upgrade to a supported version of Python (3.7 or above), Python 3.6 reached the end-of-life a long time ago. 😅

  • 🔧 Update package metadata, drop support for Python 3.6, move build internals from Flit to Hatch. PR #​5240 by @​ofek.

v0.83.0

Compare Source

🚨 This is probably the last release (or one of the last releases) to support Python 3.6. 🔥

Python 3.6 reached the end-of-life and is no longer supported by Python since around a year ago.

You hopefully updated to a supported version of Python a while ago. If you haven't, you really should.

Features
  • Add support in jsonable_encoder for include and exclude with dataclasses. PR #​4923 by @​DCsunset.
Fixes
  • 🐛 Fix RuntimeError raised when HTTPException has a status code with no content. PR #​5365 by @​iudeen.
  • 🐛 Fix empty reponse body when default status_code is empty but the a Response parameter with response.status_code is set. PR #​5360 by @​tmeckel.
Docs
Internal

v0.82.0

Compare Source

🚨 This is probably the last release (or one of the last releases) to support Python 3.6. 🔥

Python 3.6 reached the end-of-life and is no longer supported by Python since around a year ago.

You hopefully updated to a supported version of Python a while ago. If you haven't, you really should.

Features
  • Export WebSocketState in fastapi.websockets. PR #​4376 by @​matiuszka.
  • Support Python internal description on Pydantic model's docstring. PR #​3032 by @​Kludex.
  • Update ORJSONResponse to support non str keys and serializing Numpy arrays. PR #​3892 by @​baby5.
Fixes
  • 🐛 Allow exit code for dependencies with yield to always execute, by removing capacity limiter for them, to e.g. allow closing DB connections without deadlocks. PR #​5122 by @​adriangb.
  • 🐛 Fix FastAPI People GitHub Action: set HTTPX timeout for GraphQL query request. PR #​5222 by @​iudeen.
  • 🐛 Make sure a parameter defined as required is kept required in OpenAPI even if defined as optional in another dependency. PR #​4319 by @​cd17822.
  • 🐛 Fix support for path parameters in WebSockets. PR #​3879 by @​davidbrochart.
Docs
Translations
Internal

v0.81.0

Compare Source

Features
  • Add ReDoc <noscript> warning when JS is disabled. PR #​5074 by @​evroon.
  • Add support for FrozenSet in parameters (e.g. query). PR #​2938 by @​juntatalor.
  • Allow custom middlewares to raise HTTPExceptions and propagate them. PR #​2036 by @​ghandic.
  • Preserve json.JSONDecodeError information when handling invalid JSON in request body, to support custom exception handlers that use its information. PR #​4057 by @​UKnowWhoIm.
Fixes
Docs
Translations
Internal

v0.80.0

Compare Source

Breaking Changes - Fixes

If you are using response_model with some type that doesn't include None but the function is returning None, it will now raise an internal server error, because you are returning invalid data that violates the contract in response_model. Before this release it would allow breaking that contract returning None.

For example, if you have an app like this:

from fastapi import FastAPI
from pydantic import BaseModel

class Item(BaseModel):
    name: str
    price: Optional[float] = None
    owner_ids: Optional[List[int]] = None

app = FastAPI()

@&#8203;app.get("/items/invalidnone", response_model=Item)
def get_invalid_none():
    return None

...calling the path /items/invalidnone will raise an error, because None is not a valid type for the response_model declared with Item.

You could also be implicitly returning None without realizing, for example:

from fastapi import FastAPI
from pydantic import BaseModel

class Item(BaseModel):
    name: str
    price: Optional[float] = None
    owner_ids: Optional[List[int]] = None

app = FastAPI()

@&#8203;app.get("/items/invalidnone", response_model=Item)
def get_invalid_none():
    if flag:
        return {"name": "foo"}

### if flag is False, at this point the function will implicitly return None

If you have path operations using response_model that need to be allowed to return None, make it explicit in response_model using Union[Something, None]:

from typing import Union

from fastapi import FastAPI
from pydantic import BaseModel

class Item(BaseModel):
    name: str
    price: Optional[float] = None
    owner_ids: Optional[List[int]] = None

app = FastAPI()

@&#8203;app.get("/items/invalidnone", response_model=Union[Item, None])
def get_invalid_none():
    return None

This way the data will be correctly validated, you won't have an internal server error, and the documentation will also reflect that this path operation could return None (or null in JSON).

Fixes
  • ⬆ Upgrade Swagger UI copy of oauth2-redirect.html to include fixes for flavors of authorization code flows in Swagger UI. PR #​3439 initial PR by @​koonpeng.
  • ♻ Strip empty whitespace from description extracted from docstrings. PR #​2821 by @​and-semakin.
  • 🐛 Fix cached dependencies when using a dependency in Security() and other places (e.g. Depends()) with different OAuth2 scopes. PR #​2945 by @​laggardkernel.
  • 🎨 Update type annotations for response_model, allow things like Union[str, None]. PR #​5294 by @​tiangolo.
Translations

v0.79.1

Compare Source

Fixes
  • 🐛 Fix jsonable_encoder using include and exclude parameters for non-Pydantic objects. PR #​2606 by @​xaviml.
  • 🐛 Fix edge case with repeated aliases names not shown in OpenAPI. PR #​2351 by @​klaa97.
  • 📝 Add misc dependency installs to tutorial docs. PR #​2126 by @​TeoZosa.
Docs
Translations
Internal

v0.79.0

Compare Source

Fixes - Breaking Changes
  • 🐛 Fix removing body from status codes that do not support it. PR #​5145 by @​tiangolo.
    • Setting status_code to 204, 304, or any code below 200 (1xx) will remove the body from the response.
    • This fixes an error in Uvicorn that otherwise would be thrown: RuntimeError: Response content longer than Content-Length.
    • This removes fastapi.openapi.constants.STATUS_CODES_WITH_NO_BODY, it is replaced by a function in utils.
Translations
Internal

v0.78.0

Compare Source

Features
  • Add support for omitting ... as default value when declaring required parameters with:

  • Path()

  • Query()

  • Header()

  • Cookie()

  • Body()

  • Form()

  • File()

New docs at Tutorial - Query Parameters and String Validations - Make it required. PR #​4906 by @​tiangolo.

Up to now, declaring a required parameter while adding additional validation or metadata needed using ... (Ellipsis).

For example:

from fastapi import Cookie, FastAPI, Header, Path, Query

app = FastAPI()

@&#8203;app.get("/items/{item_id}")
def main(
    item_id: int = Path(default=..., gt=0),
    query: str = Query(default=..., max_length=10),
    session: str = Cookie(default=..., min_length=3),
    x_trace: str = Header(default=..., title="Tracing header"),
):
    return {"message": "Hello World"}

...all these parameters are required because the default value is ... (Ellipsis).

But now it's possible and supported to just omit the default value, as would be done with Pydantic fields, and the parameters would still be required.

For example, this is now supported:

from fastapi import Cookie, FastAPI, Header, Path, Query

app = FastAPI()

@&#8203;app.get("/items/{item_id}")
def main(
    item_id: int = Path(gt=0),
    query: str = Query(max_length=10),
    session: str = Cookie(min_length=3),
    x_trace: str = Header(title="Tracing header"),
):
    return {"message": "Hello World"}

To declare parameters as optional (not required), you can set a default value as always, for example using None:

from typing import Union
from fastapi import Cookie, FastAPI, Header, Path, Query

app = FastAPI()

@&#8203;app.get("/items/{item_id}")
def main(
    item_id: int = Path(gt=0),
    query: Union[str, None] = Query(default=None, max_length=10),
    session: Union[str, None] = Cookie(default=None, min_length=3),
    x_trace: Union[str, None] = Header(default=None, title="Tracing header"),
):
    return {"message": "Hello World"}
Docs
Translations
Internal

v0.77.1

Compare Source

Upgrades
Docs
Translations
Internal

v0.77.0

Compare Source

Upgrades
  • ⬆ Upgrade Starlette from 0.18.0 to 0.19.0. PR #​4488 by @​Kludex.
    • When creating an explicit JSONResponse the content argument is now required.
Docs
Translations

v0.76.0

Compare Source

Upgrades
Internal

v0.75.2

Compare Source

This release includes upgrades to third-party packages that handle security issues. Although there's a chance these issues don't affect you in particular, please upgrade as soon as possible.

Fixes
Upgrades
  • ⬆️ Update ujson ranges for CVE-2021-45958. PR #​4804 by @​tiangolo.
  • ⬆️ Upgrade dependencies upper range for extras "all". PR #​4803 by @​tiangolo.
  • ⬆ Upgrade Swagger UI - swagger-ui-dist@4. This handles a security issue in Swagger UI itself where it could be possible to inject HTML into Swagger UI. Please upgrade as soon as you can, in particular if you expose your Swagger UI (/docs) publicly to non-expert users. PR #​4347 by @​RAlanWright.
Internal
  • 🔧 Update sponsors, add: ExoFlare, Ines Course; remove: Dropbase, Vim.so, Calmcode; update: Striveworks, TalkPython and TestDriven.io. PR #​4805 by @​tiangolo.
  • ⬆️ Upgrade Codecov GitHub Action. PR #​4801 by @​tiangolo.

v0.75.1

Compare Source

Translations
Internal

v0.75.0

Compare Source

Features

v0.74.1

Compare Source

Features
  • Include route in scope to allow middleware and other tools to extract its information. PR #​4603 by @​tiangolo.

v0.74.0

Compare Source

Breaking Changes
  • Update internal AsyncExitStack to fix context for dependencies with yield. PR #​4575 by @​tiangolo.

Dependencies with yield can now catch HTTPException and custom exceptions. For example:

async def get_database():
    with Session() as session:
        try:
            yield session
        except HTTPException:
            session.rollback()
            raise
        finally:
            session.close()

After the dependency with yield handles the exception (or not) the exception is raised again. So that any exception handlers can catch it, or ultimately the default internal ServerErrorMiddleware.

If you depended on exceptions not being received by dependencies with yield, and receiving an exception breaks the code after yield, you can use a block with try and finally:

async def do_something():
    try:
        yield something
    finally:
        some_cleanup()

...that way the finally block is run regardless of any exception that might happen.

Features
  • The same PR #​4575 from above also fixes the contextvars context for the code before and after yield. This was the main objective of that PR.

This means that now, if you set a value in a context variable before yield, the value would still be available after yield (as you would intuitively expect). And it also means that you can reset the context variable with a token afterwards.

For example, this works correctly now:

from contextvars import ContextVar
from typing import Any, Dict, Optional

legacy_request_state_context_var: ContextVar[Optional[Dict[str, Any]]] = ContextVar(
    "legacy_request_state_context_var", default=None
)

async def set_up_request_state_dependency():
    request_state = {"user": "deadpond"}
    contextvar_token = legacy_request_state_context_var.set(request_state)
    yield request_state
    legacy_request_state_context_var.reset(contextvar_token)

...before this change it would raise an error when resetting the context variable, because the contextvars context was different, because of the way it was implemented.

Note: You probably don't need contextvars, and you should probably avoid using them. But they are powerful and useful in some advanced scenarios, for example, migrating from code that used Flask's g semi-global variable.

Technical Details: If you want to know more of the technical details you can check out the PR description #​4575.

Internal

v0.73.0

Compare Source

Features
Docs
Fixes
Internal

v0.72.0

Compare Source

Features
Docs
Translations
Internal

v0.71.0

Compare Source

Features
  • Add docs and tests for Python 3.9 and Python 3.10. PR #​3712 by @​tiangolo.
    • You can start with Python Types Intro, it explains what changes between different Python versions, in Python 3.9 and in Python 3.10.
    • All the FastAPI docs are updated. Each code example in the docs that could use different syntax in Python 3.9 or Python 3.10 now has all the alternatives in tabs.
  • ⬆️ Upgrade Starlette to 0.17.1. PR #​4145 by @​simondale00.
Internal

v0.70.1

Compare Source

There's nothing interesting in this particular FastAPI release. It is mainly to enable/unblock the release of the next version of Pydantic that comes packed with features and improvements. 🤩

Fixes
Translations
Internal

v0.70.0

Compare Source

This release just upgrades Starlette to the latest version, 0.16.0, which includes several bug fixes and some small breaking changes.

These last three consecutive releases are independent so that you can migrate gradually:

  • First to FastAPI 0.68.2, with no breaking changes, but upgrading all the sub-dependencies.
  • Next to FastAPI 0.69.0, which upgrades Starlette to 0.15.0, with AnyIO support, and a higher chance of having breaking changes in your code.
  • Finally to FastAPI 0.70.0, just upgrading Starlette to the latest version 0.16.0 with additional bug fixes.

This way, in case there was a breaking change for your code in one of the releases, you can still benefit from the previous upgrades.

Breaking Changes - Upgrade

Also upgrades the ranges of optional dependencies:

  • "jinja2 >=2.11.2,<4.0.0"
  • "itsdangerous >=1.1.0,<3.0.0"

v0.69.0

Compare Source

Breaking Changes - Upgrade

This release adds support for Trio.

It upgrades the version of Starlette to 0.15.0, now based on AnyIO, and the internal async components in FastAPI are now based on AnyIO as well, making it compatible with both asyncio and Trio.

You can read the docs about running FastAPI with Trio using Hypercorn.

This release also removes graphene as an optional dependency for GraphQL. If you need to work with GraphQL, the recommended library now is Strawberry. You can read the new FastAPI with GraphQL docs.

Features
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 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 has been generated by Renovate Bot.

This PR contains the following updates: | Package | Update | Change | |---|---|---| | [fastapi](https://github.com/tiangolo/fastapi) | minor | `==0.68.2` -> `==0.109.2` | --- ### Release Notes <details> <summary>tiangolo/fastapi (fastapi)</summary> ### [`v0.109.2`](https://github.com/tiangolo/fastapi/releases/tag/0.109.2) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.109.1...0.109.2) ##### Upgrades - ⬆️ Upgrade version of Starlette to `>= 0.36.3`. PR [#&#8203;11086](https://github.com/tiangolo/fastapi/pull/11086) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Translations - 🌐 Update Turkish translation for `docs/tr/docs/fastapi-people.md`. PR [#&#8203;10547](https://github.com/tiangolo/fastapi/pull/10547) by [@&#8203;alperiox](https://github.com/alperiox). ##### Internal - 🍱 Add new FastAPI logo. PR [#&#8203;11090](https://github.com/tiangolo/fastapi/pull/11090) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.109.1`](https://github.com/tiangolo/fastapi/releases/tag/0.109.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.109.0...0.109.1) ##### Security fixes - ⬆️ Upgrade minimum version of `python-multipart` to `>=0.0.7` to fix a vulnerability when using form data with a ReDos attack. You can also simply upgrade `python-multipart`. Read more in the [advisory: Content-Type Header ReDoS](https://github.com/tiangolo/fastapi/security/advisories/GHSA-qf9m-vfgh-m389). ##### Features - ✨ Include HTTP 205 in status codes with no body. PR [#&#8203;10969](https://github.com/tiangolo/fastapi/pull/10969) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Refactors - ✅ Refactor tests for duplicate operation ID generation for compatibility with other tools running the FastAPI test suite. PR [#&#8203;10876](https://github.com/tiangolo/fastapi/pull/10876) by [@&#8203;emmettbutler](https://github.com/emmettbutler). - ♻️ Simplify string format with f-strings in `fastapi/utils.py`. PR [#&#8203;10576](https://github.com/tiangolo/fastapi/pull/10576) by [@&#8203;eukub](https://github.com/eukub). - 🔧 Fix Ruff configuration unintentionally enabling and re-disabling mccabe complexity check. PR [#&#8203;10893](https://github.com/tiangolo/fastapi/pull/10893) by [@&#8203;jiridanek](https://github.com/jiridanek). - ✅ Re-enable test in `tests/test_tutorial/test_header_params/test_tutorial003.py` after fix in Starlette. PR [#&#8203;10904](https://github.com/tiangolo/fastapi/pull/10904) by [@&#8203;ooknimm](https://github.com/ooknimm). ##### Docs - 📝 Tweak wording in `help-fastapi.md`. PR [#&#8203;11040](https://github.com/tiangolo/fastapi/pull/11040) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Tweak docs for Behind a Proxy. PR [#&#8203;11038](https://github.com/tiangolo/fastapi/pull/11038) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Add External Link: 10 Tips for adding SQLAlchemy to FastAPI. PR [#&#8203;11036](https://github.com/tiangolo/fastapi/pull/11036) by [@&#8203;Donnype](https://github.com/Donnype). - 📝 Add External Link: Tips on migrating from Flask to FastAPI and vice-versa. PR [#&#8203;11029](https://github.com/tiangolo/fastapi/pull/11029) by [@&#8203;jtemporal](https://github.com/jtemporal). - 📝 Deprecate old tutorials: Peewee, Couchbase, encode/databases. PR [#&#8203;10979](https://github.com/tiangolo/fastapi/pull/10979) by [@&#8203;tiangolo](https://github.com/tiangolo). - ✏️ Fix typo in `fastapi/security/oauth2.py`. PR [#&#8203;10972](https://github.com/tiangolo/fastapi/pull/10972) by [@&#8203;RafalSkolasinski](https://github.com/RafalSkolasinski). - 📝 Update `HTTPException` details in `docs/en/docs/tutorial/handling-errors.md`. PR [#&#8203;5418](https://github.com/tiangolo/fastapi/pull/5418) by [@&#8203;papb](https://github.com/papb). - ✏️ A few tweaks in `docs/de/docs/tutorial/first-steps.md`. PR [#&#8203;10959](https://github.com/tiangolo/fastapi/pull/10959) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - ✏️ Fix link in `docs/en/docs/advanced/async-tests.md`. PR [#&#8203;10960](https://github.com/tiangolo/fastapi/pull/10960) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - ✏️ Fix typos for Spanish documentation. PR [#&#8203;10957](https://github.com/tiangolo/fastapi/pull/10957) by [@&#8203;jlopezlira](https://github.com/jlopezlira). - 📝 Add warning about lifespan functions and backwards compatibility with events. PR [#&#8203;10734](https://github.com/tiangolo/fastapi/pull/10734) by [@&#8203;jacob-indigo](https://github.com/jacob-indigo). - ✏️ Fix broken link in `docs/tutorial/sql-databases.md` in several languages. PR [#&#8203;10716](https://github.com/tiangolo/fastapi/pull/10716) by [@&#8203;theoohoho](https://github.com/theoohoho). - ✏️ Remove broken links from `external_links.yml`. PR [#&#8203;10943](https://github.com/tiangolo/fastapi/pull/10943) by [@&#8203;Torabek](https://github.com/Torabek). - 📝 Update template docs with more info about `url_for`. PR [#&#8203;5937](https://github.com/tiangolo/fastapi/pull/5937) by [@&#8203;EzzEddin](https://github.com/EzzEddin). - 📝 Update usage of Token model in security docs. PR [#&#8203;9313](https://github.com/tiangolo/fastapi/pull/9313) by [@&#8203;piotrszacilowski](https://github.com/piotrszacilowski). - ✏️ Update highlighted line in `docs/en/docs/tutorial/bigger-applications.md`. PR [#&#8203;5490](https://github.com/tiangolo/fastapi/pull/5490) by [@&#8203;papb](https://github.com/papb). - 📝 Add External Link: Explore How to Effectively Use JWT With FastAPI. PR [#&#8203;10212](https://github.com/tiangolo/fastapi/pull/10212) by [@&#8203;aanchlia](https://github.com/aanchlia). - 📝 Add hyperlink to `docs/en/docs/tutorial/static-files.md`. PR [#&#8203;10243](https://github.com/tiangolo/fastapi/pull/10243) by [@&#8203;hungtsetse](https://github.com/hungtsetse). - 📝 Add External Link: Instrument a FastAPI service adding tracing with OpenTelemetry and send/show traces in Grafana Tempo. PR [#&#8203;9440](https://github.com/tiangolo/fastapi/pull/9440) by [@&#8203;softwarebloat](https://github.com/softwarebloat). - 📝 Review and rewording of `en/docs/contributing.md`. PR [#&#8203;10480](https://github.com/tiangolo/fastapi/pull/10480) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - 📝 Add External Link: ML serving and monitoring with FastAPI and Evidently. PR [#&#8203;9701](https://github.com/tiangolo/fastapi/pull/9701) by [@&#8203;mnrozhkov](https://github.com/mnrozhkov). - 📝 Reword in docs, from "have in mind" to "keep in mind". PR [#&#8203;10376](https://github.com/tiangolo/fastapi/pull/10376) by [@&#8203;malicious](https://github.com/malicious). - 📝 Add External Link: Talk by Jeny Sadadia. PR [#&#8203;10265](https://github.com/tiangolo/fastapi/pull/10265) by [@&#8203;JenySadadia](https://github.com/JenySadadia). - 📝 Add location info to `tutorial/bigger-applications.md`. PR [#&#8203;10552](https://github.com/tiangolo/fastapi/pull/10552) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - ✏️ Fix Pydantic method name in `docs/en/docs/advanced/path-operation-advanced-configuration.md`. PR [#&#8203;10826](https://github.com/tiangolo/fastapi/pull/10826) by [@&#8203;ahmedabdou14](https://github.com/ahmedabdou14). ##### Translations - 🌐 Add Spanish translation for `docs/es/docs/external-links.md`. PR [#&#8203;10933](https://github.com/tiangolo/fastapi/pull/10933) by [@&#8203;pablocm83](https://github.com/pablocm83). - 🌐 Update Korean translation for `docs/ko/docs/tutorial/first-steps.md`, `docs/ko/docs/tutorial/index.md`, `docs/ko/docs/tutorial/path-params.md`, and `docs/ko/docs/tutorial/query-params.md`. PR [#&#8203;4218](https://github.com/tiangolo/fastapi/pull/4218) by [@&#8203;SnowSuno](https://github.com/SnowSuno). - 🌐 Add Chinese translation for `docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md`. PR [#&#8203;10870](https://github.com/tiangolo/fastapi/pull/10870) by [@&#8203;zhiquanchi](https://github.com/zhiquanchi). - 🌐 Add Chinese translation for `docs/zh/docs/deployment/concepts.md`. PR [#&#8203;10282](https://github.com/tiangolo/fastapi/pull/10282) by [@&#8203;xzmeng](https://github.com/xzmeng). - 🌐 Add Azerbaijani translation for `docs/az/docs/index.md`. PR [#&#8203;11047](https://github.com/tiangolo/fastapi/pull/11047) by [@&#8203;aykhans](https://github.com/aykhans). - 🌐 Add Korean translation for `docs/ko/docs/tutorial/middleware.md`. PR [#&#8203;2829](https://github.com/tiangolo/fastapi/pull/2829) by [@&#8203;JeongHyeongKim](https://github.com/JeongHyeongKim). - 🌐 Add German translation for `docs/de/docs/tutorial/body-nested-models.md`. PR [#&#8203;10313](https://github.com/tiangolo/fastapi/pull/10313) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - 🌐 Add Persian translation for `docs/fa/docs/tutorial/middleware.md`. PR [#&#8203;9695](https://github.com/tiangolo/fastapi/pull/9695) by [@&#8203;mojtabapaso](https://github.com/mojtabapaso). - 🌐 Update Farsi translation for `docs/fa/docs/index.md`. PR [#&#8203;10216](https://github.com/tiangolo/fastapi/pull/10216) by [@&#8203;theonlykingpin](https://github.com/theonlykingpin). - 🌐 Add German translation for `docs/de/docs/tutorial/body-fields.md`. PR [#&#8203;10310](https://github.com/tiangolo/fastapi/pull/10310) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - 🌐 Add German translation for `docs/de/docs/tutorial/body.md`. PR [#&#8203;10295](https://github.com/tiangolo/fastapi/pull/10295) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - 🌐 Add German translation for `docs/de/docs/tutorial/body-multiple-params.md`. PR [#&#8203;10308](https://github.com/tiangolo/fastapi/pull/10308) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/security/get-current-user.md`. PR [#&#8203;2681](https://github.com/tiangolo/fastapi/pull/2681) by [@&#8203;sh0nk](https://github.com/sh0nk). - 🌐 Add Chinese translation for `docs/zh/docs/advanced/advanced-dependencies.md`. PR [#&#8203;3798](https://github.com/tiangolo/fastapi/pull/3798) by [@&#8203;jaystone776](https://github.com/jaystone776). - 🌐 Add Chinese translation for `docs/zh/docs/advanced/events.md`. PR [#&#8203;3815](https://github.com/tiangolo/fastapi/pull/3815) by [@&#8203;jaystone776](https://github.com/jaystone776). - 🌐 Add Chinese translation for `docs/zh/docs/advanced/behind-a-proxy.md`. PR [#&#8203;3820](https://github.com/tiangolo/fastapi/pull/3820) by [@&#8203;jaystone776](https://github.com/jaystone776). - 🌐 Add Chinese translation for `docs/zh/docs/advanced/testing-events.md`. PR [#&#8203;3818](https://github.com/tiangolo/fastapi/pull/3818) by [@&#8203;jaystone776](https://github.com/jaystone776). - 🌐 Add Chinese translation for `docs/zh/docs/advanced/testing-websockets.md`. PR [#&#8203;3817](https://github.com/tiangolo/fastapi/pull/3817) by [@&#8203;jaystone776](https://github.com/jaystone776). - 🌐 Add Chinese translation for `docs/zh/docs/advanced/testing-database.md`. PR [#&#8203;3821](https://github.com/tiangolo/fastapi/pull/3821) by [@&#8203;jaystone776](https://github.com/jaystone776). - 🌐 Add Chinese translation for `docs/zh/docs/deployment/deta.md`. PR [#&#8203;3837](https://github.com/tiangolo/fastapi/pull/3837) by [@&#8203;jaystone776](https://github.com/jaystone776). - 🌐 Add Chinese translation for `docs/zh/docs/history-design-future.md`. PR [#&#8203;3832](https://github.com/tiangolo/fastapi/pull/3832) by [@&#8203;jaystone776](https://github.com/jaystone776). - 🌐 Add Chinese translation for `docs/zh/docs/project-generation.md`. PR [#&#8203;3831](https://github.com/tiangolo/fastapi/pull/3831) by [@&#8203;jaystone776](https://github.com/jaystone776). - 🌐 Add Chinese translation for `docs/zh/docs/deployment/docker.md`. PR [#&#8203;10296](https://github.com/tiangolo/fastapi/pull/10296) by [@&#8203;xzmeng](https://github.com/xzmeng). - 🌐 Update Spanish translation for `docs/es/docs/features.md`. PR [#&#8203;10884](https://github.com/tiangolo/fastapi/pull/10884) by [@&#8203;pablocm83](https://github.com/pablocm83). - 🌐 Add Spanish translation for `docs/es/docs/newsletter.md`. PR [#&#8203;10922](https://github.com/tiangolo/fastapi/pull/10922) by [@&#8203;pablocm83](https://github.com/pablocm83). - 🌐 Add Korean translation for `docs/ko/docs/tutorial/background-tasks.md`. PR [#&#8203;5910](https://github.com/tiangolo/fastapi/pull/5910) by [@&#8203;junah201](https://github.com/junah201). - :globe_with_meridians: Add Turkish translation for `docs/tr/docs/alternatives.md`. PR [#&#8203;10502](https://github.com/tiangolo/fastapi/pull/10502) by [@&#8203;alperiox](https://github.com/alperiox). - 🌐 Add Korean translation for `docs/ko/docs/tutorial/dependencies/index.md`. PR [#&#8203;10989](https://github.com/tiangolo/fastapi/pull/10989) by [@&#8203;KaniKim](https://github.com/KaniKim). - 🌐 Add Korean translation for `/docs/ko/docs/tutorial/body.md`. PR [#&#8203;11000](https://github.com/tiangolo/fastapi/pull/11000) by [@&#8203;KaniKim](https://github.com/KaniKim). - 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/schema-extra-example.md`. PR [#&#8203;4065](https://github.com/tiangolo/fastapi/pull/4065) by [@&#8203;luccasmmg](https://github.com/luccasmmg). - 🌐 Add Turkish translation for `docs/tr/docs/history-design-future.md`. PR [#&#8203;11012](https://github.com/tiangolo/fastapi/pull/11012) by [@&#8203;hasansezertasan](https://github.com/hasansezertasan). - 🌐 Add Turkish translation for `docs/tr/docs/resources/index.md`. PR [#&#8203;11020](https://github.com/tiangolo/fastapi/pull/11020) by [@&#8203;hasansezertasan](https://github.com/hasansezertasan). - 🌐 Add Turkish translation for `docs/tr/docs/how-to/index.md`. PR [#&#8203;11021](https://github.com/tiangolo/fastapi/pull/11021) by [@&#8203;hasansezertasan](https://github.com/hasansezertasan). - 🌐 Add German translation for `docs/de/docs/tutorial/query-params.md`. PR [#&#8203;10293](https://github.com/tiangolo/fastapi/pull/10293) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - 🌐 Add German translation for `docs/de/docs/benchmarks.md`. PR [#&#8203;10866](https://github.com/tiangolo/fastapi/pull/10866) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - 🌐 Add Turkish translation for `docs/tr/docs/learn/index.md`. PR [#&#8203;11014](https://github.com/tiangolo/fastapi/pull/11014) by [@&#8203;hasansezertasan](https://github.com/hasansezertasan). - 🌐 Add Persian translation for `docs/fa/docs/tutorial/security/index.md`. PR [#&#8203;9945](https://github.com/tiangolo/fastapi/pull/9945) by [@&#8203;mojtabapaso](https://github.com/mojtabapaso). - 🌐 Add Turkish translation for `docs/tr/docs/help/index.md`. PR [#&#8203;11013](https://github.com/tiangolo/fastapi/pull/11013) by [@&#8203;hasansezertasan](https://github.com/hasansezertasan). - 🌐 Add Turkish translation for `docs/tr/docs/about/index.md`. PR [#&#8203;11006](https://github.com/tiangolo/fastapi/pull/11006) by [@&#8203;hasansezertasan](https://github.com/hasansezertasan). - 🌐 Update Turkish translation for `docs/tr/docs/benchmarks.md`. PR [#&#8203;11005](https://github.com/tiangolo/fastapi/pull/11005) by [@&#8203;hasansezertasan](https://github.com/hasansezertasan). - 🌐 Add Italian translation for `docs/it/docs/index.md`. PR [#&#8203;5233](https://github.com/tiangolo/fastapi/pull/5233) by [@&#8203;matteospanio](https://github.com/matteospanio). - 🌐 Add Korean translation for `docs/ko/docs/help/index.md`. PR [#&#8203;10983](https://github.com/tiangolo/fastapi/pull/10983) by [@&#8203;KaniKim](https://github.com/KaniKim). - 🌐 Add Korean translation for `docs/ko/docs/features.md`. PR [#&#8203;10976](https://github.com/tiangolo/fastapi/pull/10976) by [@&#8203;KaniKim](https://github.com/KaniKim). - 🌐 Add Korean translation for `docs/ko/docs/tutorial/security/get-current-user.md`. PR [#&#8203;5737](https://github.com/tiangolo/fastapi/pull/5737) by [@&#8203;KdHyeon0661](https://github.com/KdHyeon0661). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/security/first-steps.md`. PR [#&#8203;10541](https://github.com/tiangolo/fastapi/pull/10541) by [@&#8203;AlertRED](https://github.com/AlertRED). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/handling-errors.md`. PR [#&#8203;10375](https://github.com/tiangolo/fastapi/pull/10375) by [@&#8203;AlertRED](https://github.com/AlertRED). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/encoder.md`. PR [#&#8203;10374](https://github.com/tiangolo/fastapi/pull/10374) by [@&#8203;AlertRED](https://github.com/AlertRED). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/body-updates.md`. PR [#&#8203;10373](https://github.com/tiangolo/fastapi/pull/10373) by [@&#8203;AlertRED](https://github.com/AlertRED). - 🌐 Russian translation: updated `fastapi-people.md`.. PR [#&#8203;10255](https://github.com/tiangolo/fastapi/pull/10255) by [@&#8203;NiKuma0](https://github.com/NiKuma0). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/security/index.md`. PR [#&#8203;5798](https://github.com/tiangolo/fastapi/pull/5798) by [@&#8203;3w36zj6](https://github.com/3w36zj6). - 🌐 Add German translation for `docs/de/docs/advanced/generate-clients.md`. PR [#&#8203;10725](https://github.com/tiangolo/fastapi/pull/10725) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - 🌐 Add German translation for `docs/de/docs/advanced/openapi-webhooks.md`. PR [#&#8203;10712](https://github.com/tiangolo/fastapi/pull/10712) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - 🌐 Add German translation for `docs/de/docs/advanced/custom-response.md`. PR [#&#8203;10624](https://github.com/tiangolo/fastapi/pull/10624) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - 🌐 Add German translation for `docs/de/docs/advanced/additional-status-codes.md`. PR [#&#8203;10617](https://github.com/tiangolo/fastapi/pull/10617) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - 🌐 Add German translation for `docs/de/docs/tutorial/middleware.md`. PR [#&#8203;10391](https://github.com/tiangolo/fastapi/pull/10391) by [@&#8203;JohannesJungbluth](https://github.com/JohannesJungbluth). - 🌐 Add German translation for introduction documents. PR [#&#8203;10497](https://github.com/tiangolo/fastapi/pull/10497) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/encoder.md`. PR [#&#8203;1955](https://github.com/tiangolo/fastapi/pull/1955) by [@&#8203;SwftAlpc](https://github.com/SwftAlpc). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/extra-data-types.md`. PR [#&#8203;1932](https://github.com/tiangolo/fastapi/pull/1932) by [@&#8203;SwftAlpc](https://github.com/SwftAlpc). - 🌐 Add Turkish translation for `docs/tr/docs/async.md`. PR [#&#8203;5191](https://github.com/tiangolo/fastapi/pull/5191) by [@&#8203;BilalAlpaslan](https://github.com/BilalAlpaslan). - 🌐 Add Turkish translation for `docs/tr/docs/project-generation.md`. PR [#&#8203;5192](https://github.com/tiangolo/fastapi/pull/5192) by [@&#8203;BilalAlpaslan](https://github.com/BilalAlpaslan). - 🌐 Add Korean translation for `docs/ko/docs/deployment/docker.md`. PR [#&#8203;5657](https://github.com/tiangolo/fastapi/pull/5657) by [@&#8203;nearnear](https://github.com/nearnear). - 🌐 Add Korean translation for `docs/ko/docs/deployment/server-workers.md`. PR [#&#8203;4935](https://github.com/tiangolo/fastapi/pull/4935) by [@&#8203;jujumilk3](https://github.com/jujumilk3). - 🌐 Add Korean translation for `docs/ko/docs/deployment/index.md`. PR [#&#8203;4561](https://github.com/tiangolo/fastapi/pull/4561) by [@&#8203;jujumilk3](https://github.com/jujumilk3). - 🌐 Add Korean translation for `docs/ko/docs/tutorial/path-operation-configuration.md`. PR [#&#8203;3639](https://github.com/tiangolo/fastapi/pull/3639) by [@&#8203;jungsu-kwon](https://github.com/jungsu-kwon). - 🌐 Modify the description of `zh` - Traditional Chinese. PR [#&#8203;10889](https://github.com/tiangolo/fastapi/pull/10889) by [@&#8203;cherinyy](https://github.com/cherinyy). - 🌐 Add Korean translation for `docs/ko/docs/tutorial/static-files.md`. PR [#&#8203;2957](https://github.com/tiangolo/fastapi/pull/2957) by [@&#8203;jeesang7](https://github.com/jeesang7). - 🌐 Add Korean translation for `docs/ko/docs/tutorial/response-model.md`. PR [#&#8203;2766](https://github.com/tiangolo/fastapi/pull/2766) by [@&#8203;hard-coders](https://github.com/hard-coders). - 🌐 Add Korean translation for `docs/ko/docs/tutorial/body-multiple-params.md`. PR [#&#8203;2461](https://github.com/tiangolo/fastapi/pull/2461) by [@&#8203;PandaHun](https://github.com/PandaHun). - 🌐 Add Korean translation for `docs/ko/docs/tutorial/query-params-str-validations.md`. PR [#&#8203;2415](https://github.com/tiangolo/fastapi/pull/2415) by [@&#8203;hard-coders](https://github.com/hard-coders). - 🌐 Add Korean translation for `docs/ko/docs/python-types.md`. PR [#&#8203;2267](https://github.com/tiangolo/fastapi/pull/2267) by [@&#8203;jrim](https://github.com/jrim). - 🌐 Add Korean translation for `docs/ko/docs/tutorial/body-nested-models.md`. PR [#&#8203;2506](https://github.com/tiangolo/fastapi/pull/2506) by [@&#8203;hard-coders](https://github.com/hard-coders). - 🌐 Add Korean translation for `docs/ko/docs/learn/index.md`. PR [#&#8203;10977](https://github.com/tiangolo/fastapi/pull/10977) by [@&#8203;KaniKim](https://github.com/KaniKim). - 🌐 Initialize translations for Traditional Chinese. PR [#&#8203;10505](https://github.com/tiangolo/fastapi/pull/10505) by [@&#8203;hsuanchi](https://github.com/hsuanchi). - ✏️ Tweak the german translation of `docs/de/docs/tutorial/index.md`. PR [#&#8203;10962](https://github.com/tiangolo/fastapi/pull/10962) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - ✏️ Fix typo error in `docs/ko/docs/tutorial/path-params.md`. PR [#&#8203;10758](https://github.com/tiangolo/fastapi/pull/10758) by [@&#8203;2chanhaeng](https://github.com/2chanhaeng). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md`. PR [#&#8203;1961](https://github.com/tiangolo/fastapi/pull/1961) by [@&#8203;SwftAlpc](https://github.com/SwftAlpc). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md`. PR [#&#8203;1960](https://github.com/tiangolo/fastapi/pull/1960) by [@&#8203;SwftAlpc](https://github.com/SwftAlpc). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/dependencies/sub-dependencies.md`. PR [#&#8203;1959](https://github.com/tiangolo/fastapi/pull/1959) by [@&#8203;SwftAlpc](https://github.com/SwftAlpc). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/background-tasks.md`. PR [#&#8203;2668](https://github.com/tiangolo/fastapi/pull/2668) by [@&#8203;tokusumi](https://github.com/tokusumi). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/dependencies/index.md` and `docs/ja/docs/tutorial/dependencies/classes-as-dependencies.md`. PR [#&#8203;1958](https://github.com/tiangolo/fastapi/pull/1958) by [@&#8203;SwftAlpc](https://github.com/SwftAlpc). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/response-model.md`. PR [#&#8203;1938](https://github.com/tiangolo/fastapi/pull/1938) by [@&#8203;SwftAlpc](https://github.com/SwftAlpc). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/body-multiple-params.md`. PR [#&#8203;1903](https://github.com/tiangolo/fastapi/pull/1903) by [@&#8203;SwftAlpc](https://github.com/SwftAlpc). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/path-params-numeric-validations.md`. PR [#&#8203;1902](https://github.com/tiangolo/fastapi/pull/1902) by [@&#8203;SwftAlpc](https://github.com/SwftAlpc). - 🌐 Add Japanese translation for `docs/ja/docs/python-types.md`. PR [#&#8203;1899](https://github.com/tiangolo/fastapi/pull/1899) by [@&#8203;SwftAlpc](https://github.com/SwftAlpc). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/handling-errors.md`. PR [#&#8203;1953](https://github.com/tiangolo/fastapi/pull/1953) by [@&#8203;SwftAlpc](https://github.com/SwftAlpc). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/response-status-code.md`. PR [#&#8203;1942](https://github.com/tiangolo/fastapi/pull/1942) by [@&#8203;SwftAlpc](https://github.com/SwftAlpc). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/extra-models.md`. PR [#&#8203;1941](https://github.com/tiangolo/fastapi/pull/1941) by [@&#8203;SwftAlpc](https://github.com/SwftAlpc). - 🌐 Add Japanese tranlsation for `docs/ja/docs/tutorial/schema-extra-example.md`. PR [#&#8203;1931](https://github.com/tiangolo/fastapi/pull/1931) by [@&#8203;SwftAlpc](https://github.com/SwftAlpc). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/body-nested-models.md`. PR [#&#8203;1930](https://github.com/tiangolo/fastapi/pull/1930) by [@&#8203;SwftAlpc](https://github.com/SwftAlpc). - 🌐 Add Japanese translation for `docs/ja/docs/tutorial/body-fields.md`. PR [#&#8203;1923](https://github.com/tiangolo/fastapi/pull/1923) by [@&#8203;SwftAlpc](https://github.com/SwftAlpc). - 🌐 Add German translation for `docs/de/docs/tutorial/index.md`. PR [#&#8203;9502](https://github.com/tiangolo/fastapi/pull/9502) by [@&#8203;fhabers21](https://github.com/fhabers21). - 🌐 Add German translation for `docs/de/docs/tutorial/background-tasks.md`. PR [#&#8203;10566](https://github.com/tiangolo/fastapi/pull/10566) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - ✏️ Fix typo in `docs/ru/docs/index.md`. PR [#&#8203;10672](https://github.com/tiangolo/fastapi/pull/10672) by [@&#8203;Delitel-WEB](https://github.com/Delitel-WEB). - ✏️ Fix typos in `docs/zh/docs/tutorial/extra-data-types.md`. PR [#&#8203;10727](https://github.com/tiangolo/fastapi/pull/10727) by [@&#8203;HiemalBeryl](https://github.com/HiemalBeryl). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/dependencies/classes-as-dependencies.md`. PR [#&#8203;10410](https://github.com/tiangolo/fastapi/pull/10410) by [@&#8203;AlertRED](https://github.com/AlertRED). ##### Internal - 👥 Update FastAPI People. PR [#&#8203;11074](https://github.com/tiangolo/fastapi/pull/11074) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors: add Coherence. PR [#&#8203;11066](https://github.com/tiangolo/fastapi/pull/11066) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Upgrade GitHub Action issue-manager. PR [#&#8203;11056](https://github.com/tiangolo/fastapi/pull/11056) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🍱 Update sponsors: TalkPython badge. PR [#&#8203;11052](https://github.com/tiangolo/fastapi/pull/11052) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors: TalkPython badge image. PR [#&#8203;11048](https://github.com/tiangolo/fastapi/pull/11048) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors, remove Deta. PR [#&#8203;11041](https://github.com/tiangolo/fastapi/pull/11041) by [@&#8203;tiangolo](https://github.com/tiangolo). - 💄 Fix CSS breaking RTL languages (erroneously introduced by a previous RTL PR). PR [#&#8203;11039](https://github.com/tiangolo/fastapi/pull/11039) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Add Italian to `mkdocs.yml`. PR [#&#8203;11016](https://github.com/tiangolo/fastapi/pull/11016) by [@&#8203;alejsdev](https://github.com/alejsdev). - 🔨 Verify `mkdocs.yml` languages in CI, update `docs.py`. PR [#&#8203;11009](https://github.com/tiangolo/fastapi/pull/11009) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update config in `label-approved.yml` to accept translations with 1 reviewer. PR [#&#8203;11007](https://github.com/tiangolo/fastapi/pull/11007) by [@&#8203;alejsdev](https://github.com/alejsdev). - 👷 Add changes-requested handling in GitHub Action issue manager. PR [#&#8203;10971](https://github.com/tiangolo/fastapi/pull/10971) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Group dependencies on dependabot updates. PR [#&#8203;10952](https://github.com/tiangolo/fastapi/pull/10952) by [@&#8203;Kludex](https://github.com/Kludex). - ⬆ Bump actions/setup-python from 4 to 5. PR [#&#8203;10764](https://github.com/tiangolo/fastapi/pull/10764) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump pypa/gh-action-pypi-publish from 1.8.10 to 1.8.11. PR [#&#8203;10731](https://github.com/tiangolo/fastapi/pull/10731) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump dawidd6/action-download-artifact from 2.28.0 to 3.0.0. PR [#&#8203;10777](https://github.com/tiangolo/fastapi/pull/10777) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 🔧 Add support for translations to languages with a longer code name, like `zh-hant`. PR [#&#8203;10950](https://github.com/tiangolo/fastapi/pull/10950) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.109.0`](https://github.com/tiangolo/fastapi/releases/tag/0.109.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.108.0...0.109.0) ##### Features - ✨ Add support for Python 3.12. PR [#&#8203;10666](https://github.com/tiangolo/fastapi/pull/10666) by [@&#8203;Jamim](https://github.com/Jamim). ##### Upgrades - ⬆️ Upgrade Starlette to >=0.35.0,<0.36.0. PR [#&#8203;10938](https://github.com/tiangolo/fastapi/pull/10938) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Docs - ✏️ Fix typo in `docs/en/docs/alternatives.md`. PR [#&#8203;10931](https://github.com/tiangolo/fastapi/pull/10931) by [@&#8203;s111d](https://github.com/s111d). - 📝 Replace `email` with `username` in `docs_src/security/tutorial007` code examples. PR [#&#8203;10649](https://github.com/tiangolo/fastapi/pull/10649) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - 📝 Add VS Code tutorial link. PR [#&#8203;10592](https://github.com/tiangolo/fastapi/pull/10592) by [@&#8203;nilslindemann](https://github.com/nilslindemann). - 📝 Add notes about Pydantic v2's new `.model_dump()`. PR [#&#8203;10929](https://github.com/tiangolo/fastapi/pull/10929) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Fix broken link in `docs/en/docs/tutorial/sql-databases.md`. PR [#&#8203;10765](https://github.com/tiangolo/fastapi/pull/10765) by [@&#8203;HurSungYun](https://github.com/HurSungYun). - 📝 Add External Link: FastAPI application monitoring made easy. PR [#&#8203;10917](https://github.com/tiangolo/fastapi/pull/10917) by [@&#8203;tiangolo](https://github.com/tiangolo). - ✨ Generate automatic language names for docs translations. PR [#&#8203;5354](https://github.com/tiangolo/fastapi/pull/5354) by [@&#8203;jakul](https://github.com/jakul). - ✏️ Fix typos in `docs/en/docs/alternatives.md` and `docs/en/docs/tutorial/dependencies/index.md`. PR [#&#8203;10906](https://github.com/tiangolo/fastapi/pull/10906) by [@&#8203;s111d](https://github.com/s111d). - ✏️ Fix typos in `docs/en/docs/tutorial/dependencies/dependencies-with-yield.md`. PR [#&#8203;10834](https://github.com/tiangolo/fastapi/pull/10834) by [@&#8203;Molkree](https://github.com/Molkree). - 📝 Add article: "Building a RESTful API with FastAPI: Secure Signup and Login Functionality Included". PR [#&#8203;9733](https://github.com/tiangolo/fastapi/pull/9733) by [@&#8203;dxphilo](https://github.com/dxphilo). - 📝 Add warning about lifecycle events with `AsyncClient`. PR [#&#8203;4167](https://github.com/tiangolo/fastapi/pull/4167) by [@&#8203;andrew-chang-dewitt](https://github.com/andrew-chang-dewitt). - ✏️ Fix typos in `/docs/reference/exceptions.md` and `/en/docs/reference/status.md`. PR [#&#8203;10809](https://github.com/tiangolo/fastapi/pull/10809) by [@&#8203;clarencepenz](https://github.com/clarencepenz). - ✏️ Fix typo in `openapi-callbacks.md`. PR [#&#8203;10673](https://github.com/tiangolo/fastapi/pull/10673) by [@&#8203;kayjan](https://github.com/kayjan). - ✏️ Fix typo in `fastapi/routing.py` . PR [#&#8203;10520](https://github.com/tiangolo/fastapi/pull/10520) by [@&#8203;sepsh](https://github.com/sepsh). - 📝 Replace HTTP code returned in case of existing user error in docs for testing. PR [#&#8203;4482](https://github.com/tiangolo/fastapi/pull/4482) by [@&#8203;TristanMarion](https://github.com/TristanMarion). - 📝 Add blog for FastAPI & Supabase. PR [#&#8203;6018](https://github.com/tiangolo/fastapi/pull/6018) by [@&#8203;theinfosecguy](https://github.com/theinfosecguy). - 📝 Update example source files for SQL databases with SQLAlchemy. PR [#&#8203;9508](https://github.com/tiangolo/fastapi/pull/9508) by [@&#8203;s-mustafa](https://github.com/s-mustafa). - 📝 Update code examples in docs for body, replace name `create_item` with `update_item` when appropriate. PR [#&#8203;5913](https://github.com/tiangolo/fastapi/pull/5913) by [@&#8203;OttoAndrey](https://github.com/OttoAndrey). - ✏️ Fix typo in dependencies with yield source examples. PR [#&#8203;10847](https://github.com/tiangolo/fastapi/pull/10847) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Translations - 🌐 Add Bengali translation for `docs/bn/docs/index.md`. PR [#&#8203;9177](https://github.com/tiangolo/fastapi/pull/9177) by [@&#8203;Fahad-Md-Kamal](https://github.com/Fahad-Md-Kamal). - ✏️ Update Python version in `index.md` in several languages. PR [#&#8203;10711](https://github.com/tiangolo/fastapi/pull/10711) by [@&#8203;tamago3keran](https://github.com/tamago3keran). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/request-forms-and-files.md`. PR [#&#8203;10347](https://github.com/tiangolo/fastapi/pull/10347) by [@&#8203;AlertRED](https://github.com/AlertRED). - 🌐 Add Ukrainian translation for `docs/uk/docs/index.md`. PR [#&#8203;10362](https://github.com/tiangolo/fastapi/pull/10362) by [@&#8203;rostik1410](https://github.com/rostik1410). - ✏️ Update Python version in `docs/ko/docs/index.md`. PR [#&#8203;10680](https://github.com/tiangolo/fastapi/pull/10680) by [@&#8203;Eeap](https://github.com/Eeap). - 🌐 Add Persian translation for `docs/fa/docs/features.md`. PR [#&#8203;5887](https://github.com/tiangolo/fastapi/pull/5887) by [@&#8203;amirilf](https://github.com/amirilf). - 🌐 Add Chinese translation for `docs/zh/docs/advanced/additional-responses.md`. PR [#&#8203;10325](https://github.com/tiangolo/fastapi/pull/10325) by [@&#8203;ShuibeiC](https://github.com/ShuibeiC). - 🌐 Fix typos in Russian translations for `docs/ru/docs/tutorial/background-tasks.md`, `docs/ru/docs/tutorial/body-nested-models.md`, `docs/ru/docs/tutorial/debugging.md`, `docs/ru/docs/tutorial/testing.md`. PR [#&#8203;10311](https://github.com/tiangolo/fastapi/pull/10311) by [@&#8203;AlertRED](https://github.com/AlertRED). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/request-files.md`. PR [#&#8203;10332](https://github.com/tiangolo/fastapi/pull/10332) by [@&#8203;AlertRED](https://github.com/AlertRED). - 🌐 Add Chinese translation for `docs/zh/docs/deployment/server-workers.md`. PR [#&#8203;10292](https://github.com/tiangolo/fastapi/pull/10292) by [@&#8203;xzmeng](https://github.com/xzmeng). - 🌐 Add Chinese translation for `docs/zh/docs/deployment/cloud.md`. PR [#&#8203;10291](https://github.com/tiangolo/fastapi/pull/10291) by [@&#8203;xzmeng](https://github.com/xzmeng). - 🌐 Add Chinese translation for `docs/zh/docs/deployment/manually.md`. PR [#&#8203;10279](https://github.com/tiangolo/fastapi/pull/10279) by [@&#8203;xzmeng](https://github.com/xzmeng). - 🌐 Add Chinese translation for `docs/zh/docs/deployment/https.md`. PR [#&#8203;10277](https://github.com/tiangolo/fastapi/pull/10277) by [@&#8203;xzmeng](https://github.com/xzmeng). - 🌐 Add Chinese translation for `docs/zh/docs/deployment/index.md`. PR [#&#8203;10275](https://github.com/tiangolo/fastapi/pull/10275) by [@&#8203;xzmeng](https://github.com/xzmeng). - 🌐 Add German translation for `docs/de/docs/tutorial/first-steps.md`. PR [#&#8203;9530](https://github.com/tiangolo/fastapi/pull/9530) by [@&#8203;fhabers21](https://github.com/fhabers21). - 🌐 Update Turkish translation for `docs/tr/docs/index.md`. PR [#&#8203;10444](https://github.com/tiangolo/fastapi/pull/10444) by [@&#8203;hasansezertasan](https://github.com/hasansezertasan). - 🌐 Add Chinese translation for `docs/zh/docs/learn/index.md`. PR [#&#8203;10479](https://github.com/tiangolo/fastapi/pull/10479) by [@&#8203;KAZAMA-DREAM](https://github.com/KAZAMA-DREAM). - 🌐 Add Russian translation for `docs/ru/docs/learn/index.md`. PR [#&#8203;10539](https://github.com/tiangolo/fastapi/pull/10539) by [@&#8203;AlertRED](https://github.com/AlertRED). - 🌐 Update SQLAlchemy instruction in Chinese translation `docs/zh/docs/tutorial/sql-databases.md`. PR [#&#8203;9712](https://github.com/tiangolo/fastapi/pull/9712) by [@&#8203;Royc30ne](https://github.com/Royc30ne). - 🌐 Add Turkish translation for `docs/tr/docs/external-links.md`. PR [#&#8203;10549](https://github.com/tiangolo/fastapi/pull/10549) by [@&#8203;hasansezertasan](https://github.com/hasansezertasan). - 🌐 Add Spanish translation for `docs/es/docs/learn/index.md`. PR [#&#8203;10885](https://github.com/tiangolo/fastapi/pull/10885) by [@&#8203;pablocm83](https://github.com/pablocm83). - 🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/body-fields.md`. PR [#&#8203;10670](https://github.com/tiangolo/fastapi/pull/10670) by [@&#8203;ArtemKhymenko](https://github.com/ArtemKhymenko). - 🌐 Add Hungarian translation for `/docs/hu/docs/index.md`. PR [#&#8203;10812](https://github.com/tiangolo/fastapi/pull/10812) by [@&#8203;takacs](https://github.com/takacs). - 🌐 Add Turkish translation for `docs/tr/docs/newsletter.md`. PR [#&#8203;10550](https://github.com/tiangolo/fastapi/pull/10550) by [@&#8203;hasansezertasan](https://github.com/hasansezertasan). - 🌐 Add Spanish translation for `docs/es/docs/help/index.md`. PR [#&#8203;10907](https://github.com/tiangolo/fastapi/pull/10907) by [@&#8203;pablocm83](https://github.com/pablocm83). - 🌐 Add Spanish translation for `docs/es/docs/about/index.md`. PR [#&#8203;10908](https://github.com/tiangolo/fastapi/pull/10908) by [@&#8203;pablocm83](https://github.com/pablocm83). - 🌐 Add Spanish translation for `docs/es/docs/resources/index.md`. PR [#&#8203;10909](https://github.com/tiangolo/fastapi/pull/10909) by [@&#8203;pablocm83](https://github.com/pablocm83). ##### Internal - 👥 Update FastAPI People. PR [#&#8203;10871](https://github.com/tiangolo/fastapi/pull/10871) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Upgrade custom GitHub Action comment-docs-preview-in-pr. PR [#&#8203;10916](https://github.com/tiangolo/fastapi/pull/10916) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆️ Upgrade GitHub Action latest-changes. PR [#&#8203;10915](https://github.com/tiangolo/fastapi/pull/10915) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Upgrade GitHub Action label-approved. PR [#&#8203;10913](https://github.com/tiangolo/fastapi/pull/10913) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆️ Upgrade GitHub Action label-approved. PR [#&#8203;10905](https://github.com/tiangolo/fastapi/pull/10905) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.108.0`](https://github.com/tiangolo/fastapi/releases/tag/0.108.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.107.0...0.108.0) ##### Upgrades - ⬆️ Upgrade Starlette to `>=0.29.0,<0.33.0`, update docs and usage of templates with new Starlette arguments. PR [#&#8203;10846](https://github.com/tiangolo/fastapi/pull/10846) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.107.0`](https://github.com/tiangolo/fastapi/releases/tag/0.107.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.106.0...0.107.0) ##### Upgrades - ⬆️ Upgrade Starlette to 0.28.0. PR [#&#8203;9636](https://github.com/tiangolo/fastapi/pull/9636) by [@&#8203;adriangb](https://github.com/adriangb). ##### Docs - 📝 Add docs: Node.js script alternative to update OpenAPI for generated clients. PR [#&#8203;10845](https://github.com/tiangolo/fastapi/pull/10845) by [@&#8203;alejsdev](https://github.com/alejsdev). - 📝 Restructure Docs section in Contributing page. PR [#&#8203;10844](https://github.com/tiangolo/fastapi/pull/10844) by [@&#8203;alejsdev](https://github.com/alejsdev). ### [`v0.106.0`](https://github.com/tiangolo/fastapi/releases/tag/0.106.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.105.0...0.106.0) ##### Breaking Changes Using resources from dependencies with `yield` in background tasks is no longer supported. This change is what supports the new features, read below. 🤓 ##### Dependencies with `yield`, `HTTPException` and Background Tasks Dependencies with `yield` now can raise `HTTPException` and other exceptions after `yield`. 🎉 Read the new docs here: [Dependencies with `yield` and `HTTPException`](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#dependencies-with-yield-and-httpexception). ```Python from fastapi import Depends, FastAPI, HTTPException from typing_extensions import Annotated app = FastAPI() data = { "plumbus": {"description": "Freshly pickled plumbus", "owner": "Morty"}, "portal-gun": {"description": "Gun to create portals", "owner": "Rick"}, } class OwnerError(Exception): pass def get_username(): try: yield "Rick" except OwnerError as e: raise HTTPException(status_code=400, detail=f"Onwer error: {e}") @&#8203;app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id not in data: raise HTTPException(status_code=404, detail="Item not found") item = data[item_id] if item["owner"] != username: raise OwnerError(username) return item ``` *** Before FastAPI 0.106.0, raising exceptions after `yield` was not possible, the exit code in dependencies with `yield` was executed *after* the response was sent, so [Exception Handlers](https://fastapi.tiangolo.com/tutorial/handling-errors/#install-custom-exception-handlers) would have already run. This was designed this way mainly to allow using the same objects "yielded" by dependencies inside of background tasks, because the exit code would be executed after the background tasks were finished. Nevertheless, as this would mean waiting for the response to travel through the network while unnecessarily holding a resource in a dependency with yield (for example a database connection), this was changed in FastAPI 0.106.0. Additionally, a background task is normally an independent set of logic that should be handled separately, with its own resources (e.g. its own database connection). If you used to rely on this behavior, now you should create the resources for background tasks inside the background task itself, and use internally only data that doesn't depend on the resources of dependencies with `yield`. For example, instead of using the same database session, you would create a new database session inside of the background task, and you would obtain the objects from the database using this new session. And then instead of passing the object from the database as a parameter to the background task function, you would pass the ID of that object and then obtain the object again inside the background task function. The sequence of execution before FastAPI 0.106.0 was like the diagram in the [Release Notes for FastAPI 0.106.0](https://fastapi.tiangolo.com/release-notes/#&#8203;01060). The new execution flow can be found in the docs: [Execution of dependencies with `yield`](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#execution-of-dependencies-with-yield). ### [`v0.105.0`](https://github.com/tiangolo/fastapi/releases/tag/0.105.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.104.1...0.105.0) ##### Features - ✨ Add support for multiple Annotated annotations, e.g. `Annotated[str, Field(), Query()]`. PR [#&#8203;10773](https://github.com/tiangolo/fastapi/pull/10773) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Refactors - 🔥 Remove unused NoneType. PR [#&#8203;10774](https://github.com/tiangolo/fastapi/pull/10774) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Docs - 📝 Tweak default suggested configs for generating clients. PR [#&#8203;10736](https://github.com/tiangolo/fastapi/pull/10736) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Internal - 🔧 Update sponsors, add Scalar. PR [#&#8203;10728](https://github.com/tiangolo/fastapi/pull/10728) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors, add PropelAuth. PR [#&#8203;10760](https://github.com/tiangolo/fastapi/pull/10760) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Update build docs, verify README on CI. PR [#&#8203;10750](https://github.com/tiangolo/fastapi/pull/10750) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors, remove Fern. PR [#&#8203;10729](https://github.com/tiangolo/fastapi/pull/10729) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors, add Codacy. PR [#&#8203;10677](https://github.com/tiangolo/fastapi/pull/10677) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors, add Reflex. PR [#&#8203;10676](https://github.com/tiangolo/fastapi/pull/10676) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Update release notes, move and check latest-changes. PR [#&#8203;10588](https://github.com/tiangolo/fastapi/pull/10588) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Upgrade latest-changes GitHub Action. PR [#&#8203;10587](https://github.com/tiangolo/fastapi/pull/10587) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.104.1`](https://github.com/tiangolo/fastapi/releases/tag/0.104.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.104.0...0.104.1) ##### Fixes - 📌 Pin Swagger UI version to 5.9.0 temporarily to handle a bug crashing it in 5.9.1. PR [#&#8203;10529](https://github.com/tiangolo/fastapi/pull/10529) by [@&#8203;alejandraklachquin](https://github.com/alejandraklachquin). - This is not really a bug in FastAPI but in Swagger UI, nevertheless pinning the version will work while a solution is found on the [Swagger UI side](https://github.com/swagger-api/swagger-ui/issues/9337). ##### Docs - 📝 Update data structure and render for external-links. PR [#&#8203;10495](https://github.com/tiangolo/fastapi/pull/10495) by [@&#8203;tiangolo](https://github.com/tiangolo). - ✏️ Fix link to SPDX license identifier in `docs/en/docs/tutorial/metadata.md`. PR [#&#8203;10433](https://github.com/tiangolo/fastapi/pull/10433) by [@&#8203;worldworm](https://github.com/worldworm). - 📝 Update example validation error from Pydantic v1 to match Pydantic v2 in `docs/en/docs/tutorial/path-params.md`. PR [#&#8203;10043](https://github.com/tiangolo/fastapi/pull/10043) by [@&#8203;giuliowaitforitdavide](https://github.com/giuliowaitforitdavide). - ✏️ Fix typos in emoji docs and in some source examples. PR [#&#8203;10438](https://github.com/tiangolo/fastapi/pull/10438) by [@&#8203;afuetterer](https://github.com/afuetterer). - ✏️ Fix typo in `docs/en/docs/reference/dependencies.md`. PR [#&#8203;10465](https://github.com/tiangolo/fastapi/pull/10465) by [@&#8203;suravshresth](https://github.com/suravshresth). - ✏️ Fix typos and rewordings in `docs/en/docs/tutorial/body-nested-models.md`. PR [#&#8203;10468](https://github.com/tiangolo/fastapi/pull/10468) by [@&#8203;yogabonito](https://github.com/yogabonito). - 📝 Update docs, remove references to removed `pydantic.Required` in `docs/en/docs/tutorial/query-params-str-validations.md`. PR [#&#8203;10469](https://github.com/tiangolo/fastapi/pull/10469) by [@&#8203;yogabonito](https://github.com/yogabonito). - ✏️ Fix typo in `docs/en/docs/reference/index.md`. PR [#&#8203;10467](https://github.com/tiangolo/fastapi/pull/10467) by [@&#8203;tarsil](https://github.com/tarsil). - 🔥 Remove unnecessary duplicated docstrings. PR [#&#8203;10484](https://github.com/tiangolo/fastapi/pull/10484) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Internal - ✏️ Update Pydantic links to dotenv support. PR [#&#8203;10511](https://github.com/tiangolo/fastapi/pull/10511) by [@&#8203;White-Mask](https://github.com/White-Mask). - ✏️ Update links in `docs/en/docs/async.md` and `docs/zh/docs/async.md` to make them relative. PR [#&#8203;10498](https://github.com/tiangolo/fastapi/pull/10498) by [@&#8203;hasnatsajid](https://github.com/hasnatsajid). - ✏️ Fix links in `docs/em/docs/async.md`. PR [#&#8203;10507](https://github.com/tiangolo/fastapi/pull/10507) by [@&#8203;hasnatsajid](https://github.com/hasnatsajid). - ✏️ Fix typo in `docs/em/docs/index.md`, Python 3.8. PR [#&#8203;10521](https://github.com/tiangolo/fastapi/pull/10521) by [@&#8203;kerriop](https://github.com/kerriop). - ⬆ Bump pillow from 9.5.0 to 10.1.0. PR [#&#8203;10446](https://github.com/tiangolo/fastapi/pull/10446) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Update mkdocs-material requirement from <9.0.0,>=8.1.4 to >=8.1.4,<10.0.0. PR [#&#8203;5862](https://github.com/tiangolo/fastapi/pull/5862) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump mkdocs-material from 9.1.21 to 9.4.7. PR [#&#8203;10545](https://github.com/tiangolo/fastapi/pull/10545) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 👷 Install MkDocs Material Insiders only when secrets are available, for Dependabot. PR [#&#8203;10544](https://github.com/tiangolo/fastapi/pull/10544) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors badges, Databento. PR [#&#8203;10519](https://github.com/tiangolo/fastapi/pull/10519) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Adopt Ruff format. PR [#&#8203;10517](https://github.com/tiangolo/fastapi/pull/10517) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Add `CITATION.cff` file for academic citations. PR [#&#8203;10496](https://github.com/tiangolo/fastapi/pull/10496) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🐛 Fix overriding MKDocs theme lang in hook. PR [#&#8203;10490](https://github.com/tiangolo/fastapi/pull/10490) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔥 Drop/close Gitter chat. Questions should go to GitHub Discussions, free conversations to Discord.. PR [#&#8203;10485](https://github.com/tiangolo/fastapi/pull/10485) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.104.0`](https://github.com/tiangolo/fastapi/releases/tag/0.104.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.103.2...0.104.0) #### Features - ✨ Add reference (code API) docs with PEP 727, add subclass with custom docstrings for `BackgroundTasks`, refactor docs structure. PR [#&#8203;10392](https://github.com/tiangolo/fastapi/pull/10392) by [@&#8203;tiangolo](https://github.com/tiangolo). New docs at [FastAPI Reference - Code API](https://fastapi.tiangolo.com/reference/). #### Upgrades - ⬆️ Drop support for Python 3.7, require Python 3.8 or above. PR [#&#8203;10442](https://github.com/tiangolo/fastapi/pull/10442) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Internal - ⬆ Bump dawidd6/action-download-artifact from 2.27.0 to 2.28.0. PR [#&#8203;10268](https://github.com/tiangolo/fastapi/pull/10268) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump actions/checkout from 3 to 4. PR [#&#8203;10208](https://github.com/tiangolo/fastapi/pull/10208) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump pypa/gh-action-pypi-publish from 1.8.6 to 1.8.10. PR [#&#8203;10061](https://github.com/tiangolo/fastapi/pull/10061) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 🔧 Update sponsors, Bump.sh images. PR [#&#8203;10381](https://github.com/tiangolo/fastapi/pull/10381) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👥 Update FastAPI People. PR [#&#8203;10363](https://github.com/tiangolo/fastapi/pull/10363) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.103.2`](https://github.com/tiangolo/fastapi/releases/tag/0.103.2) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.103.1...0.103.2) ##### Refactors - ⬆️ Upgrade compatibility with Pydantic v2.4, new renamed functions and JSON Schema input/output models with default values. PR [#&#8203;10344](https://github.com/tiangolo/fastapi/pull/10344) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Translations - 🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/extra-data-types.md`. PR [#&#8203;10132](https://github.com/tiangolo/fastapi/pull/10132) by [@&#8203;ArtemKhymenko](https://github.com/ArtemKhymenko). - 🌐 Fix typos in French translations for `docs/fr/docs/advanced/path-operation-advanced-configuration.md`, `docs/fr/docs/alternatives.md`, `docs/fr/docs/async.md`, `docs/fr/docs/features.md`, `docs/fr/docs/help-fastapi.md`, `docs/fr/docs/index.md`, `docs/fr/docs/python-types.md`, `docs/fr/docs/tutorial/body.md`, `docs/fr/docs/tutorial/first-steps.md`, `docs/fr/docs/tutorial/query-params.md`. PR [#&#8203;10154](https://github.com/tiangolo/fastapi/pull/10154) by [@&#8203;s-rigaud](https://github.com/s-rigaud). - 🌐 Add Chinese translation for `docs/zh/docs/async.md`. PR [#&#8203;5591](https://github.com/tiangolo/fastapi/pull/5591) by [@&#8203;mkdir700](https://github.com/mkdir700). - 🌐 Update Chinese translation for `docs/tutorial/security/simple-oauth2.md`. PR [#&#8203;3844](https://github.com/tiangolo/fastapi/pull/3844) by [@&#8203;jaystone776](https://github.com/jaystone776). - 🌐 Add Korean translation for `docs/ko/docs/deployment/cloud.md`. PR [#&#8203;10191](https://github.com/tiangolo/fastapi/pull/10191) by [@&#8203;Sion99](https://github.com/Sion99). - 🌐 Add Japanese translation for `docs/ja/docs/deployment/https.md`. PR [#&#8203;10298](https://github.com/tiangolo/fastapi/pull/10298) by [@&#8203;tamtam-fitness](https://github.com/tamtam-fitness). - 🌐 Fix typo in Russian translation for `docs/ru/docs/tutorial/body-fields.md`. PR [#&#8203;10224](https://github.com/tiangolo/fastapi/pull/10224) by [@&#8203;AlertRED](https://github.com/AlertRED). - 🌐 Add Polish translation for `docs/pl/docs/help-fastapi.md`. PR [#&#8203;10121](https://github.com/tiangolo/fastapi/pull/10121) by [@&#8203;romabozhanovgithub](https://github.com/romabozhanovgithub). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/header-params.md`. PR [#&#8203;10226](https://github.com/tiangolo/fastapi/pull/10226) by [@&#8203;AlertRED](https://github.com/AlertRED). - 🌐 Add Chinese translation for `docs/zh/docs/deployment/versions.md`. PR [#&#8203;10276](https://github.com/tiangolo/fastapi/pull/10276) by [@&#8203;xzmeng](https://github.com/xzmeng). ##### Internal - 🔧 Update sponsors, remove Flint. PR [#&#8203;10349](https://github.com/tiangolo/fastapi/pull/10349) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Rename label "awaiting review" to "awaiting-review" to simplify search queries. PR [#&#8203;10343](https://github.com/tiangolo/fastapi/pull/10343) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors, enable Svix (revert [#&#8203;10228](https://github.com/tiangolo/fastapi/issues/10228)). PR [#&#8203;10253](https://github.com/tiangolo/fastapi/pull/10253) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors, remove Svix. PR [#&#8203;10228](https://github.com/tiangolo/fastapi/pull/10228) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors, add Bump.sh. PR [#&#8203;10227](https://github.com/tiangolo/fastapi/pull/10227) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.103.1`](https://github.com/tiangolo/fastapi/releases/tag/0.103.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.103.0...0.103.1) ##### Fixes - 📌 Pin AnyIO to < 4.0.0 to handle an incompatibility while upgrading to Starlette 0.31.1. PR [#&#8203;10194](https://github.com/tiangolo/fastapi/pull/10194) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Docs - ✏️ Fix validation parameter name in docs, from `regex` to `pattern`. PR [#&#8203;10085](https://github.com/tiangolo/fastapi/pull/10085) by [@&#8203;pablodorrio](https://github.com/pablodorrio). - ✏️ Fix indent format in `docs/en/docs/deployment/server-workers.md`. PR [#&#8203;10066](https://github.com/tiangolo/fastapi/pull/10066) by [@&#8203;tamtam-fitness](https://github.com/tamtam-fitness). - ✏️ Fix Pydantic examples in tutorial for Python types. PR [#&#8203;9961](https://github.com/tiangolo/fastapi/pull/9961) by [@&#8203;rahulsalgare](https://github.com/rahulsalgare). - ✏️ Fix link to Pydantic docs in `docs/en/docs/tutorial/extra-data-types.md`. PR [#&#8203;10155](https://github.com/tiangolo/fastapi/pull/10155) by [@&#8203;hasnatsajid](https://github.com/hasnatsajid). - ✏️ Fix typo in `docs/en/docs/tutorial/handling-errors.md`. PR [#&#8203;10170](https://github.com/tiangolo/fastapi/pull/10170) by [@&#8203;poupapaa](https://github.com/poupapaa). - ✏️ Fix typo in `docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md`. PR [#&#8203;10172](https://github.com/tiangolo/fastapi/pull/10172) by [@&#8203;ragul-kachiappan](https://github.com/ragul-kachiappan). ##### Translations - 🌐 Remove duplicate line in translation for `docs/pt/docs/tutorial/path-params.md`. PR [#&#8203;10126](https://github.com/tiangolo/fastapi/pull/10126) by [@&#8203;LecoOliveira](https://github.com/LecoOliveira). - 🌐 Add Yoruba translation for `docs/yo/docs/index.md`. PR [#&#8203;10033](https://github.com/tiangolo/fastapi/pull/10033) by [@&#8203;AfolabiOlaoluwa](https://github.com/AfolabiOlaoluwa). - 🌐 Add Ukrainian translation for `docs/uk/docs/python-types.md`. PR [#&#8203;10080](https://github.com/tiangolo/fastapi/pull/10080) by [@&#8203;rostik1410](https://github.com/rostik1410). - 🌐 Add Vietnamese translations for `docs/vi/docs/tutorial/first-steps.md` and `docs/vi/docs/tutorial/index.md`. PR [#&#8203;10088](https://github.com/tiangolo/fastapi/pull/10088) by [@&#8203;magiskboy](https://github.com/magiskboy). - 🌐 Add Ukrainian translation for `docs/uk/docs/alternatives.md`. PR [#&#8203;10060](https://github.com/tiangolo/fastapi/pull/10060) by [@&#8203;whysage](https://github.com/whysage). - 🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/index.md`. PR [#&#8203;10079](https://github.com/tiangolo/fastapi/pull/10079) by [@&#8203;rostik1410](https://github.com/rostik1410). - ✏️ Fix typos in `docs/en/docs/how-to/separate-openapi-schemas.md` and `docs/en/docs/tutorial/schema-extra-example.md`. PR [#&#8203;10189](https://github.com/tiangolo/fastapi/pull/10189) by [@&#8203;xzmeng](https://github.com/xzmeng). - 🌐 Add Chinese translation for `docs/zh/docs/advanced/generate-clients.md`. PR [#&#8203;9883](https://github.com/tiangolo/fastapi/pull/9883) by [@&#8203;funny-cat-happy](https://github.com/funny-cat-happy). ##### Refactors - ✏️ Fix typos in comment in `fastapi/applications.py`. PR [#&#8203;10045](https://github.com/tiangolo/fastapi/pull/10045) by [@&#8203;AhsanSheraz](https://github.com/AhsanSheraz). - ✅ Add missing test for OpenAPI examples, it was missing in coverage. PR [#&#8203;10188](https://github.com/tiangolo/fastapi/pull/10188) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Internal - 👥 Update FastAPI People. PR [#&#8203;10186](https://github.com/tiangolo/fastapi/pull/10186) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.103.0`](https://github.com/tiangolo/fastapi/releases/tag/0.103.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.102.0...0.103.0) ##### Features - ✨ Add support for `openapi_examples` in all FastAPI parameters. PR [#&#8203;10152](https://github.com/tiangolo/fastapi/pull/10152) by [@&#8203;tiangolo](https://github.com/tiangolo). - New docs: [OpenAPI-specific examples](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#openapi-specific-examples). ##### Docs - 📝 Add note to docs about Separate Input and Output Schemas with FastAPI version. PR [#&#8203;10150](https://github.com/tiangolo/fastapi/pull/10150) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.102.0`](https://github.com/tiangolo/fastapi/releases/tag/0.102.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.101.1...0.102.0) ##### Features - ✨ Add support for disabling the separation of input and output JSON Schemas in OpenAPI with Pydantic v2 with `separate_input_output_schemas=False`. PR [#&#8203;10145](https://github.com/tiangolo/fastapi/pull/10145) by [@&#8203;tiangolo](https://github.com/tiangolo). - New docs [Separate OpenAPI Schemas for Input and Output or Not](https://fastapi.tiangolo.com/how-to/separate-openapi-schemas/). - This PR also includes a new setup (internal tools) for generating screenshots for the docs. ##### Refactors - ♻️ Refactor tests for new Pydantic 2.2.1. PR [#&#8203;10115](https://github.com/tiangolo/fastapi/pull/10115) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Docs - 📝 Add new docs section, How To - Recipes, move docs that don't have to be read by everyone to How To. PR [#&#8203;10114](https://github.com/tiangolo/fastapi/pull/10114) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Update Advanced docs, add links to sponsor courses. PR [#&#8203;10113](https://github.com/tiangolo/fastapi/pull/10113) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Update docs for generating clients. PR [#&#8203;10112](https://github.com/tiangolo/fastapi/pull/10112) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Tweak MkDocs and add redirects. PR [#&#8203;10111](https://github.com/tiangolo/fastapi/pull/10111) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Restructure docs for cloud providers, include links to sponsors. PR [#&#8203;10110](https://github.com/tiangolo/fastapi/pull/10110) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Internal - 🔧 Update sponsors, add Speakeasy. PR [#&#8203;10098](https://github.com/tiangolo/fastapi/pull/10098) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.101.1`](https://github.com/tiangolo/fastapi/releases/tag/0.101.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.101.0...0.101.1) ##### Fixes - ✨ Add `ResponseValidationError` printable details, to show up in server error logs. PR [#&#8203;10078](https://github.com/tiangolo/fastapi/pull/10078) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Refactors - ✏️ Fix typo in deprecation warnings in `fastapi/params.py`. PR [#&#8203;9854](https://github.com/tiangolo/fastapi/pull/9854) by [@&#8203;russbiggs](https://github.com/russbiggs). - ✏️ Fix typos in comments on internal code in `fastapi/concurrency.py` and `fastapi/routing.py`. PR [#&#8203;9590](https://github.com/tiangolo/fastapi/pull/9590) by [@&#8203;ElliottLarsen](https://github.com/ElliottLarsen). ##### Docs - ✏️ Fix typo in release notes. PR [#&#8203;9835](https://github.com/tiangolo/fastapi/pull/9835) by [@&#8203;francisbergin](https://github.com/francisbergin). - 📝 Add external article: Build an SMS Spam Classifier Serverless Database with FaunaDB and FastAPI. PR [#&#8203;9847](https://github.com/tiangolo/fastapi/pull/9847) by [@&#8203;adejumoridwan](https://github.com/adejumoridwan). - 📝 Fix typo in `docs/en/docs/contributing.md`. PR [#&#8203;9878](https://github.com/tiangolo/fastapi/pull/9878) by [@&#8203;VicenteMerino](https://github.com/VicenteMerino). - 📝 Fix code highlighting in `docs/en/docs/tutorial/bigger-applications.md`. PR [#&#8203;9806](https://github.com/tiangolo/fastapi/pull/9806) by [@&#8203;theonlykingpin](https://github.com/theonlykingpin). ##### Translations - 🌐 Add Japanese translation for `docs/ja/docs/deployment/concepts.md`. PR [#&#8203;10062](https://github.com/tiangolo/fastapi/pull/10062) by [@&#8203;tamtam-fitness](https://github.com/tamtam-fitness). - 🌐 Add Japanese translation for `docs/ja/docs/deployment/server-workers.md`. PR [#&#8203;10064](https://github.com/tiangolo/fastapi/pull/10064) by [@&#8203;tamtam-fitness](https://github.com/tamtam-fitness). - 🌐 Update Japanese translation for `docs/ja/docs/deployment/docker.md`. PR [#&#8203;10073](https://github.com/tiangolo/fastapi/pull/10073) by [@&#8203;tamtam-fitness](https://github.com/tamtam-fitness). - 🌐 Add Ukrainian translation for `docs/uk/docs/fastapi-people.md`. PR [#&#8203;10059](https://github.com/tiangolo/fastapi/pull/10059) by [@&#8203;rostik1410](https://github.com/rostik1410). - 🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/cookie-params.md`. PR [#&#8203;10032](https://github.com/tiangolo/fastapi/pull/10032) by [@&#8203;rostik1410](https://github.com/rostik1410). - 🌐 Add Russian translation for `docs/ru/docs/deployment/docker.md`. PR [#&#8203;9971](https://github.com/tiangolo/fastapi/pull/9971) by [@&#8203;Xewus](https://github.com/Xewus). - 🌐 Add Vietnamese translation for `docs/vi/docs/python-types.md`. PR [#&#8203;10047](https://github.com/tiangolo/fastapi/pull/10047) by [@&#8203;magiskboy](https://github.com/magiskboy). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/dependencies/global-dependencies.md`. PR [#&#8203;9970](https://github.com/tiangolo/fastapi/pull/9970) by [@&#8203;dudyaosuplayer](https://github.com/dudyaosuplayer). - 🌐 Add Urdu translation for `docs/ur/docs/benchmarks.md`. PR [#&#8203;9974](https://github.com/tiangolo/fastapi/pull/9974) by [@&#8203;AhsanSheraz](https://github.com/AhsanSheraz). ##### Internal - 🔧 Add sponsor Porter. PR [#&#8203;10051](https://github.com/tiangolo/fastapi/pull/10051) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors, add Jina back as bronze sponsor. PR [#&#8203;10050](https://github.com/tiangolo/fastapi/pull/10050) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ Bump mypy from 1.4.0 to 1.4.1. PR [#&#8203;9756](https://github.com/tiangolo/fastapi/pull/9756) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump mkdocs-material from 9.1.17 to 9.1.21. PR [#&#8203;9960](https://github.com/tiangolo/fastapi/pull/9960) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). ### [`v0.101.0`](https://github.com/tiangolo/fastapi/releases/tag/0.101.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.100.1...0.101.0) ##### Features - ✨ Enable Pydantic's serialization mode for responses, add support for Pydantic's `computed_field`, better OpenAPI for response models, proper required attributes, better generated clients. PR [#&#8203;10011](https://github.com/tiangolo/fastapi/pull/10011) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Refactors - ✅ Fix tests for compatibility with pydantic 2.1.1. PR [#&#8203;9943](https://github.com/tiangolo/fastapi/pull/9943) by [@&#8203;dmontagu](https://github.com/dmontagu). - ✅ Fix test error in Windows for `jsonable_encoder`. PR [#&#8203;9840](https://github.com/tiangolo/fastapi/pull/9840) by [@&#8203;iudeen](https://github.com/iudeen). ##### Upgrades - 📌 Do not allow Pydantic 2.1.0 that breaks (require 2.1.1). PR [#&#8203;10012](https://github.com/tiangolo/fastapi/pull/10012) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Translations - 🌐 Add Russian translation for `docs/ru/docs/tutorial/security/index.md`. PR [#&#8203;9963](https://github.com/tiangolo/fastapi/pull/9963) by [@&#8203;eVery1337](https://github.com/eVery1337). - 🌐 Remove Vietnamese note about missing translation. PR [#&#8203;9957](https://github.com/tiangolo/fastapi/pull/9957) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Internal - 👷 Add GitHub Actions step dump context to debug external failures. PR [#&#8203;10008](https://github.com/tiangolo/fastapi/pull/10008) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Restore MkDocs Material pin after the fix. PR [#&#8203;10001](https://github.com/tiangolo/fastapi/pull/10001) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update the Question template to ask for the Pydantic version. PR [#&#8203;10000](https://github.com/tiangolo/fastapi/pull/10000) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📍 Update MkDocs Material dependencies. PR [#&#8203;9986](https://github.com/tiangolo/fastapi/pull/9986) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👥 Update FastAPI People. PR [#&#8203;9999](https://github.com/tiangolo/fastapi/pull/9999) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🐳 Update Dockerfile with compatibility versions, to upgrade later. PR [#&#8203;9998](https://github.com/tiangolo/fastapi/pull/9998) by [@&#8203;tiangolo](https://github.com/tiangolo). - ➕ Add pydantic-settings to FastAPI People dependencies. PR [#&#8203;9988](https://github.com/tiangolo/fastapi/pull/9988) by [@&#8203;tiangolo](https://github.com/tiangolo). - ♻️ Update FastAPI People logic with new Pydantic. PR [#&#8203;9985](https://github.com/tiangolo/fastapi/pull/9985) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🍱 Update sponsors, Fern badge. PR [#&#8203;9982](https://github.com/tiangolo/fastapi/pull/9982) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Deploy docs to Cloudflare Pages. PR [#&#8203;9978](https://github.com/tiangolo/fastapi/pull/9978) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsor Fern. PR [#&#8203;9979](https://github.com/tiangolo/fastapi/pull/9979) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Update CI debug mode with Tmate. PR [#&#8203;9977](https://github.com/tiangolo/fastapi/pull/9977) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.100.1`](https://github.com/tiangolo/fastapi/releases/tag/0.100.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.100.0...0.100.1) ##### Fixes - 🐛 Replace `MultHostUrl` to `AnyUrl` for compatibility with older versions of Pydantic v1. PR [#&#8203;9852](https://github.com/tiangolo/fastapi/pull/9852) by [@&#8203;Kludex](https://github.com/Kludex). ##### Docs - 📝 Update links for self-hosted Swagger UI, point to v5, for OpenAPI 31.0. PR [#&#8203;9834](https://github.com/tiangolo/fastapi/pull/9834) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Translations - 🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/body.md`. PR [#&#8203;4574](https://github.com/tiangolo/fastapi/pull/4574) by [@&#8203;ss-o-furda](https://github.com/ss-o-furda). - 🌐 Add Vietnamese translation for `docs/vi/docs/features.md` and `docs/vi/docs/index.md`. PR [#&#8203;3006](https://github.com/tiangolo/fastapi/pull/3006) by [@&#8203;magiskboy](https://github.com/magiskboy). - 🌐 Add Korean translation for `docs/ko/docs/async.md`. PR [#&#8203;4179](https://github.com/tiangolo/fastapi/pull/4179) by [@&#8203;NinaHwang](https://github.com/NinaHwang). - 🌐 Add Chinese translation for `docs/zh/docs/tutorial/background-tasks.md`. PR [#&#8203;9812](https://github.com/tiangolo/fastapi/pull/9812) by [@&#8203;wdh99](https://github.com/wdh99). - 🌐 Add French translation for `docs/fr/docs/tutorial/query-params-str-validations.md`. PR [#&#8203;4075](https://github.com/tiangolo/fastapi/pull/4075) by [@&#8203;Smlep](https://github.com/Smlep). - 🌐 Add French translation for `docs/fr/docs/tutorial/index.md`. PR [#&#8203;2234](https://github.com/tiangolo/fastapi/pull/2234) by [@&#8203;JulianMaurin](https://github.com/JulianMaurin). - 🌐 Add French translation for `docs/fr/docs/contributing.md`. PR [#&#8203;2132](https://github.com/tiangolo/fastapi/pull/2132) by [@&#8203;JulianMaurin](https://github.com/JulianMaurin). - 🌐 Add French translation for `docs/fr/docs/benchmarks.md`. PR [#&#8203;2155](https://github.com/tiangolo/fastapi/pull/2155) by [@&#8203;clemsau](https://github.com/clemsau). - 🌐 Update Chinese translations with new source files. PR [#&#8203;9738](https://github.com/tiangolo/fastapi/pull/9738) by [@&#8203;mahone3297](https://github.com/mahone3297). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/request-forms.md`. PR [#&#8203;9841](https://github.com/tiangolo/fastapi/pull/9841) by [@&#8203;dedkot01](https://github.com/dedkot01). - 🌐 Update Chinese translation for `docs/zh/docs/tutorial/handling-errors.md`. PR [#&#8203;9485](https://github.com/tiangolo/fastapi/pull/9485) by [@&#8203;Creat55](https://github.com/Creat55). ##### Internal - 🔧 Update sponsors, add Fern. PR [#&#8203;9956](https://github.com/tiangolo/fastapi/pull/9956) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Update FastAPI People token. PR [#&#8203;9844](https://github.com/tiangolo/fastapi/pull/9844) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👥 Update FastAPI People. PR [#&#8203;9775](https://github.com/tiangolo/fastapi/pull/9775) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Update MkDocs Material token. PR [#&#8203;9843](https://github.com/tiangolo/fastapi/pull/9843) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Update token for latest changes. PR [#&#8203;9842](https://github.com/tiangolo/fastapi/pull/9842) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.100.0`](https://github.com/tiangolo/fastapi/releases/tag/0.100.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.99.1...0.100.0) ✨ Support for **Pydantic v2** ✨ Pydantic version 2 has the **core** re-written in **Rust** and includes a lot of improvements and features, for example: - Improved **correctness** in corner cases. - **Safer** types. - Better **performance** and **less energy** consumption. - Better **extensibility**. - etc. ...all this while keeping the **same Python API**. In most of the cases, for simple models, you can simply upgrade the Pydantic version and get all the benefits. 🚀 In some cases, for pure data validation and processing, you can get performance improvements of **20x** or more. This means 2,000% or more. 🤯 When you use **FastAPI**, there's a lot more going on, processing the request and response, handling dependencies, executing **your own code**, and particularly, **waiting for the network**. But you will probably still get some nice performance improvements just from the upgrade. The focus of this release is **compatibility** with Pydantic v1 and v2, to make sure your current apps keep working. Later there will be more focus on refactors, correctness, code improvements, and then **performance** improvements. Some third-party early beta testers that ran benchmarks on the beta releases of FastAPI reported improvements of **2x - 3x**. Which is not bad for just doing `pip install --upgrade fastapi pydantic`. This was not an official benchmark and I didn't check it myself, but it's a good sign. ##### Migration Check out the [Pydantic migration guide](https://docs.pydantic.dev/2.0/migration/). For the things that need changes in your Pydantic models, the Pydantic team built [`bump-pydantic`](https://github.com/pydantic/bump-pydantic). A command line tool that will **process your code** and update most of the things **automatically** for you. Make sure you have your code in git first, and review each of the changes to make sure everything is correct before committing the changes. ##### Pydantic v1 **This version of FastAPI still supports Pydantic v1**. And although Pydantic v1 will be deprecated at some point, ti will still be supported for a while. This means that you can install the new Pydantic v2, and if something fails, you can install Pydantic v1 while you fix any problems you might have, but having the latest FastAPI. There are **tests for both Pydantic v1 and v2**, and test **coverage** is kept at **100%**. ##### Changes - There are **new parameter** fields supported by Pydantic `Field()` for: - `Path()` - `Query()` - `Header()` - `Cookie()` - `Body()` - `Form()` - `File()` - The new parameter fields are: - `default_factory` - `alias_priority` - `validation_alias` - `serialization_alias` - `discriminator` - `strict` - `multiple_of` - `allow_inf_nan` - `max_digits` - `decimal_places` - `json_schema_extra` ...you can read about them in the Pydantic docs. - The parameter `regex` has been deprecated and replaced by `pattern`. - You can read more about it in the docs for [Query Parameters and String Validations: Add regular expressions](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#add-regular-expressions). - New Pydantic models use an improved and simplified attribute `model_config` that takes a simple dict instead of an internal class `Config` for their configuration. - You can read more about it in the docs for [Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/). - The attribute `schema_extra` for the internal class `Config` has been replaced by the key `json_schema_extra` in the new `model_config` dict. - You can read more about it in the docs for [Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/). - When you install `"fastapi[all]"` it now also includes: - <a href="https://docs.pydantic.dev/latest/usage/pydantic_settings/" target="_blank"><code>pydantic-settings</code></a> - for settings management. - <a href="https://docs.pydantic.dev/latest/usage/types/extra_types/extra_types/" target="_blank"><code>pydantic-extra-types</code></a> - for extra types to be used with Pydantic. - Now Pydantic Settings is an additional optional package (included in `"fastapi[all]"`). To use settings you should now import `from pydantic_settings import BaseSettings` instead of importing from `pydantic` directly. - You can read more about it in the docs for [Settings and Environment Variables](https://fastapi.tiangolo.com/advanced/settings/). - PR [#&#8203;9816](https://github.com/tiangolo/fastapi/pull/9816) by [@&#8203;tiangolo](https://github.com/tiangolo), included all the work done (in multiple PRs) on the beta branch (`main-pv2`). ### [`v0.99.1`](https://github.com/tiangolo/fastapi/releases/tag/0.99.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.99.0...0.99.1) ##### Fixes - 🐛 Fix JSON Schema accepting bools as valid JSON Schemas, e.g. `additionalProperties: false`. PR [#&#8203;9781](https://github.com/tiangolo/fastapi/pull/9781) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Docs - 📝 Update source examples to use new JSON Schema examples field. PR [#&#8203;9776](https://github.com/tiangolo/fastapi/pull/9776) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.99.0`](https://github.com/tiangolo/fastapi/releases/tag/0.99.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.98.0...0.99.0) **Note**: this is the **last release before supporting Pydantic v2**. You can try out the beta with support for Pydantic v2 now, a new beta supporting Pydantic v2 with these same changes from this release will be available in the next hours/days. And the final version (0.100.0) with support for Pydantic v2 will be released in the next days (next week). Now, back to this release (this one doesn't include the beta support for Pydantic v2). This release has ✨ **OpenAPI 3.1.0** ✨ 🎉 ##### Features - ✨ Add support for OpenAPI 3.1.0. PR [#&#8203;9770](https://github.com/tiangolo/fastapi/pull/9770) by [@&#8203;tiangolo](https://github.com/tiangolo). - New support for documenting **webhooks**, read the new docs here: <a href="https://fastapi.tiangolo.com/advanced/openapi-webhooks/" class="external-link" target="_blank">Advanced User Guide: OpenAPI Webhooks</a>. - Upgrade OpenAPI 3.1.0, this uses JSON Schema 2020-12. - Upgrade Swagger UI to version 5.x.x, that supports OpenAPI 3.1.0. - Updated `examples` field in `Query()`, `Cookie()`, `Body()`, etc. based on the latest JSON Schema and OpenAPI. Now it takes a list of examples and they are included directly in the JSON Schema, not outside. Read more about it (including the historical technical details) in the updated docs: <a href="https://fastapi.tiangolo.com/tutorial/schema-extra-example/" class="external-link" target="_blank">Tutorial: Declare Request Example Data</a>. - ✨ Add support for `deque` objects and children in `jsonable_encoder`. PR [#&#8203;9433](https://github.com/tiangolo/fastapi/pull/9433) by [@&#8203;cranium](https://github.com/cranium). ##### Docs - 📝 Fix form for the FastAPI and friends newsletter. PR [#&#8203;9749](https://github.com/tiangolo/fastapi/pull/9749) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Translations - 🌐 Add Persian translation for `docs/fa/docs/advanced/sub-applications.md`. PR [#&#8203;9692](https://github.com/tiangolo/fastapi/pull/9692) by [@&#8203;mojtabapaso](https://github.com/mojtabapaso). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/response-model.md`. PR [#&#8203;9675](https://github.com/tiangolo/fastapi/pull/9675) by [@&#8203;glsglsgls](https://github.com/glsglsgls). ##### Internal - 🔨 Enable linenums in MkDocs Material during local live development to simplify highlighting code. PR [#&#8203;9769](https://github.com/tiangolo/fastapi/pull/9769) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ Update httpx requirement from <0.24.0,>=0.23.0 to >=0.23.0,<0.25.0. PR [#&#8203;9724](https://github.com/tiangolo/fastapi/pull/9724) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump mkdocs-material from 9.1.16 to 9.1.17. PR [#&#8203;9746](https://github.com/tiangolo/fastapi/pull/9746) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 🔥 Remove missing translation dummy pages, no longer necessary. PR [#&#8203;9751](https://github.com/tiangolo/fastapi/pull/9751) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ \[pre-commit.ci] pre-commit autoupdate. PR [#&#8203;9259](https://github.com/tiangolo/fastapi/pull/9259) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci). - ✨ Add Material for MkDocs Insiders features and cards. PR [#&#8203;9748](https://github.com/tiangolo/fastapi/pull/9748) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔥 Remove languages without translations. PR [#&#8203;9743](https://github.com/tiangolo/fastapi/pull/9743) by [@&#8203;tiangolo](https://github.com/tiangolo). - ✨ Refactor docs for building scripts, use MkDocs hooks, simplify (remove) configs for languages. PR [#&#8203;9742](https://github.com/tiangolo/fastapi/pull/9742) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔨 Add MkDocs hook that renames sections based on the first index file. PR [#&#8203;9737](https://github.com/tiangolo/fastapi/pull/9737) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Make cron jobs run only on main repo, not on forks, to avoid error notifications from missing tokens. PR [#&#8203;9735](https://github.com/tiangolo/fastapi/pull/9735) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update MkDocs for other languages. PR [#&#8203;9734](https://github.com/tiangolo/fastapi/pull/9734) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Refactor Docs CI, run in multiple workers with a dynamic matrix to optimize speed. PR [#&#8203;9732](https://github.com/tiangolo/fastapi/pull/9732) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔥 Remove old internal GitHub Action watch-previews that is no longer needed. PR [#&#8203;9730](https://github.com/tiangolo/fastapi/pull/9730) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆️ Upgrade MkDocs and MkDocs Material. PR [#&#8203;9729](https://github.com/tiangolo/fastapi/pull/9729) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Build and deploy docs only on docs changes. PR [#&#8203;9728](https://github.com/tiangolo/fastapi/pull/9728) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.98.0`](https://github.com/tiangolo/fastapi/releases/tag/0.98.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.97.0...0.98.0) **Note**: please also help me try out the beta with support for Pydantic v2: https://github.com/tiangolo/fastapi/releases/tag/0.100.0-beta1 Now, back to this release (this one doesn't include the beta support for Pydantic v2). ##### Features - ✨ Allow disabling `redirect_slashes` at the FastAPI app level. PR [#&#8203;3432](https://github.com/tiangolo/fastapi/pull/3432) by [@&#8203;cyberlis](https://github.com/cyberlis). ##### Docs - 📝 Update docs on Pydantic using ujson internally. PR [#&#8203;5804](https://github.com/tiangolo/fastapi/pull/5804) by [@&#8203;mvasilkov](https://github.com/mvasilkov). - ✏ Rewording in `docs/en/docs/tutorial/debugging.md`. PR [#&#8203;9581](https://github.com/tiangolo/fastapi/pull/9581) by [@&#8203;ivan-abc](https://github.com/ivan-abc). - 📝 Add german blog post (Domain-driven Design mit Python und FastAPI). PR [#&#8203;9261](https://github.com/tiangolo/fastapi/pull/9261) by [@&#8203;msander](https://github.com/msander). - ✏️ Tweak wording in `docs/en/docs/tutorial/security/index.md`. PR [#&#8203;9561](https://github.com/tiangolo/fastapi/pull/9561) by [@&#8203;jyothish-mohan](https://github.com/jyothish-mohan). - 📝 Update `Annotated` notes in `docs/en/docs/tutorial/schema-extra-example.md`. PR [#&#8203;9620](https://github.com/tiangolo/fastapi/pull/9620) by [@&#8203;Alexandrhub](https://github.com/Alexandrhub). - ✏️ Fix typo `Annotation` -> `Annotated` in `docs/en/docs/tutorial/query-params-str-validations.md`. PR [#&#8203;9625](https://github.com/tiangolo/fastapi/pull/9625) by [@&#8203;mccricardo](https://github.com/mccricardo). - 📝 Use in memory database for testing SQL in docs. PR [#&#8203;1223](https://github.com/tiangolo/fastapi/pull/1223) by [@&#8203;HarshaLaxman](https://github.com/HarshaLaxman). ##### Translations - 🌐 Add Russian translation for `docs/ru/docs/tutorial/metadata.md`. PR [#&#8203;9681](https://github.com/tiangolo/fastapi/pull/9681) by [@&#8203;TabarakoAkula](https://github.com/TabarakoAkula). - 🌐 Fix typo in Spanish translation for `docs/es/docs/tutorial/first-steps.md`. PR [#&#8203;9571](https://github.com/tiangolo/fastapi/pull/9571) by [@&#8203;lilidl-nft](https://github.com/lilidl-nft). - 🌐 Add Russian translation for `docs/tutorial/path-operation-configuration.md`. PR [#&#8203;9696](https://github.com/tiangolo/fastapi/pull/9696) by [@&#8203;TabarakoAkula](https://github.com/TabarakoAkula). - 🌐 Add Chinese translation for `docs/zh/docs/advanced/security/index.md`. PR [#&#8203;9666](https://github.com/tiangolo/fastapi/pull/9666) by [@&#8203;lordqyxz](https://github.com/lordqyxz). - 🌐 Add Chinese translations for `docs/zh/docs/advanced/settings.md`. PR [#&#8203;9652](https://github.com/tiangolo/fastapi/pull/9652) by [@&#8203;ChoyeonChern](https://github.com/ChoyeonChern). - 🌐 Add Chinese translations for `docs/zh/docs/advanced/websockets.md`. PR [#&#8203;9651](https://github.com/tiangolo/fastapi/pull/9651) by [@&#8203;ChoyeonChern](https://github.com/ChoyeonChern). - 🌐 Add Chinese translation for `docs/zh/docs/tutorial/testing.md`. PR [#&#8203;9641](https://github.com/tiangolo/fastapi/pull/9641) by [@&#8203;wdh99](https://github.com/wdh99). - 🌐 Add Russian translation for `docs/tutorial/extra-models.md`. PR [#&#8203;9619](https://github.com/tiangolo/fastapi/pull/9619) by [@&#8203;ivan-abc](https://github.com/ivan-abc). - 🌐 Add Russian translation for `docs/tutorial/cors.md`. PR [#&#8203;9608](https://github.com/tiangolo/fastapi/pull/9608) by [@&#8203;ivan-abc](https://github.com/ivan-abc). - 🌐 Add Polish translation for `docs/pl/docs/features.md`. PR [#&#8203;5348](https://github.com/tiangolo/fastapi/pull/5348) by [@&#8203;mbroton](https://github.com/mbroton). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/body-nested-models.md`. PR [#&#8203;9605](https://github.com/tiangolo/fastapi/pull/9605) by [@&#8203;Alexandrhub](https://github.com/Alexandrhub). ##### Internal - ⬆ Bump ruff from 0.0.272 to 0.0.275. PR [#&#8203;9721](https://github.com/tiangolo/fastapi/pull/9721) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Update uvicorn\[standard] requirement from <0.21.0,>=0.12.0 to >=0.12.0,<0.23.0. PR [#&#8203;9463](https://github.com/tiangolo/fastapi/pull/9463) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump mypy from 1.3.0 to 1.4.0. PR [#&#8203;9719](https://github.com/tiangolo/fastapi/pull/9719) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Update pre-commit requirement from <3.0.0,>=2.17.0 to >=2.17.0,<4.0.0. PR [#&#8203;9251](https://github.com/tiangolo/fastapi/pull/9251) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump pypa/gh-action-pypi-publish from 1.8.5 to 1.8.6. PR [#&#8203;9482](https://github.com/tiangolo/fastapi/pull/9482) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ✏️ Fix tooltips for light/dark theme toggler in docs. PR [#&#8203;9588](https://github.com/tiangolo/fastapi/pull/9588) by [@&#8203;pankaj1707k](https://github.com/pankaj1707k). - 🔧 Set minimal hatchling version needed to build the package. PR [#&#8203;9240](https://github.com/tiangolo/fastapi/pull/9240) by [@&#8203;mgorny](https://github.com/mgorny). - 📝 Add repo link to PyPI. PR [#&#8203;9559](https://github.com/tiangolo/fastapi/pull/9559) by [@&#8203;JacobCoffee](https://github.com/JacobCoffee). - ✏️ Fix typos in data for tests. PR [#&#8203;4958](https://github.com/tiangolo/fastapi/pull/4958) by [@&#8203;ryanrussell](https://github.com/ryanrussell). - 🔧 Update sponsors, add Flint. PR [#&#8203;9699](https://github.com/tiangolo/fastapi/pull/9699) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Lint in CI only once, only with one version of Python, run tests with all of them. PR [#&#8203;9686](https://github.com/tiangolo/fastapi/pull/9686) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.97.0`](https://github.com/tiangolo/fastapi/releases/tag/0.97.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.96.1...0.97.0) ##### Features - ✨ Add support for `dependencies` in WebSocket routes. PR [#&#8203;4534](https://github.com/tiangolo/fastapi/pull/4534) by [@&#8203;paulo-raca](https://github.com/paulo-raca). - ✨ Add exception handler for `WebSocketRequestValidationError` (which also allows to override it). PR [#&#8203;6030](https://github.com/tiangolo/fastapi/pull/6030) by [@&#8203;kristjanvalur](https://github.com/kristjanvalur). ##### Refactors - ⬆️ Upgrade and fully migrate to Ruff, remove isort, includes a couple of tweaks suggested by the new version of Ruff. PR [#&#8203;9660](https://github.com/tiangolo/fastapi/pull/9660) by [@&#8203;tiangolo](https://github.com/tiangolo). - ♻️ Update internal type annotations and upgrade mypy. PR [#&#8203;9658](https://github.com/tiangolo/fastapi/pull/9658) by [@&#8203;tiangolo](https://github.com/tiangolo). - ♻️ Simplify `AsyncExitStackMiddleware` as without Python 3.6 `AsyncExitStack` is always available. PR [#&#8203;9657](https://github.com/tiangolo/fastapi/pull/9657) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Upgrades - ⬆️ Upgrade Black. PR [#&#8203;9661](https://github.com/tiangolo/fastapi/pull/9661) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Internal - 💚 Update CI cache to fix installs when dependencies change. PR [#&#8203;9659](https://github.com/tiangolo/fastapi/pull/9659) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬇️ Separate requirements for development into their own requirements.txt files, they shouldn't be extras. PR [#&#8203;9655](https://github.com/tiangolo/fastapi/pull/9655) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.96.1`](https://github.com/tiangolo/fastapi/releases/tag/0.96.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.96.0...0.96.1) ##### Fixes - 🐛 Fix `HTTPException` header type annotations. PR [#&#8203;9648](https://github.com/tiangolo/fastapi/pull/9648) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🐛 Fix OpenAPI model fields int validations, `gte` to `ge`. PR [#&#8203;9635](https://github.com/tiangolo/fastapi/pull/9635) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Upgrades - 📌 Update minimum version of Pydantic to >=1.7.4. This fixes an issue when trying to use an old version of Pydantic. PR [#&#8203;9567](https://github.com/tiangolo/fastapi/pull/9567) by [@&#8203;Kludex](https://github.com/Kludex). ##### Refactors - ♻ Remove `media_type` from `ORJSONResponse` as it's inherited from the parent class. PR [#&#8203;5805](https://github.com/tiangolo/fastapi/pull/5805) by [@&#8203;Kludex](https://github.com/Kludex). - ♻ Instantiate `HTTPException` only when needed, optimization refactor. PR [#&#8203;5356](https://github.com/tiangolo/fastapi/pull/5356) by [@&#8203;pawamoy](https://github.com/pawamoy). ##### Docs - 🔥 Remove link to Pydantic's benchmark, as it was removed there. PR [#&#8203;5811](https://github.com/tiangolo/fastapi/pull/5811) by [@&#8203;Kludex](https://github.com/Kludex). ##### Translations - 🌐 Fix spelling in Indonesian translation of `docs/id/docs/tutorial/index.md`. PR [#&#8203;5635](https://github.com/tiangolo/fastapi/pull/5635) by [@&#8203;purwowd](https://github.com/purwowd). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/index.md`. PR [#&#8203;5896](https://github.com/tiangolo/fastapi/pull/5896) by [@&#8203;Wilidon](https://github.com/Wilidon). - 🌐 Add Chinese translations for `docs/zh/docs/advanced/response-change-status-code.md` and `docs/zh/docs/advanced/response-headers.md`. PR [#&#8203;9544](https://github.com/tiangolo/fastapi/pull/9544) by [@&#8203;ChoyeonChern](https://github.com/ChoyeonChern). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/schema-extra-example.md`. PR [#&#8203;9621](https://github.com/tiangolo/fastapi/pull/9621) by [@&#8203;Alexandrhub](https://github.com/Alexandrhub). ##### Internal - 🔧 Add sponsor Platform.sh. PR [#&#8203;9650](https://github.com/tiangolo/fastapi/pull/9650) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Add custom token to Smokeshow and Preview Docs for download-artifact, to prevent API rate limits. PR [#&#8203;9646](https://github.com/tiangolo/fastapi/pull/9646) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Add custom tokens for GitHub Actions to avoid rate limits. PR [#&#8203;9647](https://github.com/tiangolo/fastapi/pull/9647) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.96.0`](https://github.com/tiangolo/fastapi/releases/tag/0.96.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.95.2...0.96.0) ##### Features - ⚡ Update `create_cloned_field` to use a global cache and improve startup performance. PR [#&#8203;4645](https://github.com/tiangolo/fastapi/pull/4645) by [@&#8203;madkinsz](https://github.com/madkinsz) and previous original PR by [@&#8203;huonw](https://github.com/huonw). ##### Docs - 📝 Update Deta deployment tutorial for compatibility with Deta Space. PR [#&#8203;6004](https://github.com/tiangolo/fastapi/pull/6004) by [@&#8203;mikBighne98](https://github.com/mikBighne98). - ✏️ Fix typo in Deta deployment tutorial. PR [#&#8203;9501](https://github.com/tiangolo/fastapi/pull/9501) by [@&#8203;lemonyte](https://github.com/lemonyte). ##### Translations - 🌐 Add Russian translation for `docs/tutorial/body.md`. PR [#&#8203;3885](https://github.com/tiangolo/fastapi/pull/3885) by [@&#8203;solomein-sv](https://github.com/solomein-sv). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/static-files.md`. PR [#&#8203;9580](https://github.com/tiangolo/fastapi/pull/9580) by [@&#8203;Alexandrhub](https://github.com/Alexandrhub). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/query-params.md`. PR [#&#8203;9584](https://github.com/tiangolo/fastapi/pull/9584) by [@&#8203;Alexandrhub](https://github.com/Alexandrhub). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/first-steps.md`. PR [#&#8203;9471](https://github.com/tiangolo/fastapi/pull/9471) by [@&#8203;AGolicyn](https://github.com/AGolicyn). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/debugging.md`. PR [#&#8203;9579](https://github.com/tiangolo/fastapi/pull/9579) by [@&#8203;Alexandrhub](https://github.com/Alexandrhub). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/path-params.md`. PR [#&#8203;9519](https://github.com/tiangolo/fastapi/pull/9519) by [@&#8203;AGolicyn](https://github.com/AGolicyn). - 🌐 Add Chinese translation for `docs/zh/docs/tutorial/static-files.md`. PR [#&#8203;9436](https://github.com/tiangolo/fastapi/pull/9436) by [@&#8203;wdh99](https://github.com/wdh99). - 🌐 Update Spanish translation including new illustrations in `docs/es/docs/async.md`. PR [#&#8203;9483](https://github.com/tiangolo/fastapi/pull/9483) by [@&#8203;andresbermeoq](https://github.com/andresbermeoq). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/path-params-numeric-validations.md`. PR [#&#8203;9563](https://github.com/tiangolo/fastapi/pull/9563) by [@&#8203;ivan-abc](https://github.com/ivan-abc). - 🌐 Add Russian translation for `docs/ru/docs/deployment/concepts.md`. PR [#&#8203;9577](https://github.com/tiangolo/fastapi/pull/9577) by [@&#8203;Xewus](https://github.com/Xewus). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/body-multiple-params.md`. PR [#&#8203;9586](https://github.com/tiangolo/fastapi/pull/9586) by [@&#8203;Alexandrhub](https://github.com/Alexandrhub). ##### Internal - 👥 Update FastAPI People. PR [#&#8203;9602](https://github.com/tiangolo/fastapi/pull/9602) by [@&#8203;github-actions\[bot\]](https://github.com/apps/github-actions). - 🔧 Update sponsors, remove InvestSuite. PR [#&#8203;9612](https://github.com/tiangolo/fastapi/pull/9612) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.95.2`](https://github.com/tiangolo/fastapi/releases/tag/0.95.2) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.95.1...0.95.2) - ⬆️ Upgrade Starlette version to `>=0.27.0` for a security release. PR [#&#8203;9541](https://github.com/tiangolo/fastapi/pull/9541) by [@&#8203;tiangolo](https://github.com/tiangolo). Details on [Starlette's security advisory](https://github.com/encode/starlette/security/advisories/GHSA-v5gw-mw7f-84px). ##### Translations - 🌐 Add Portuguese translation for `docs/pt/docs/advanced/events.md`. PR [#&#8203;9326](https://github.com/tiangolo/fastapi/pull/9326) by [@&#8203;oandersonmagalhaes](https://github.com/oandersonmagalhaes). - 🌐 Add Russian translation for `docs/ru/docs/deployment/manually.md`. PR [#&#8203;9417](https://github.com/tiangolo/fastapi/pull/9417) by [@&#8203;Xewus](https://github.com/Xewus). - 🌐 Add setup for translations to Lao. PR [#&#8203;9396](https://github.com/tiangolo/fastapi/pull/9396) by [@&#8203;TheBrown](https://github.com/TheBrown). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/testing.md`. PR [#&#8203;9403](https://github.com/tiangolo/fastapi/pull/9403) by [@&#8203;Xewus](https://github.com/Xewus). - 🌐 Add Russian translation for `docs/ru/docs/deployment/https.md`. PR [#&#8203;9428](https://github.com/tiangolo/fastapi/pull/9428) by [@&#8203;Xewus](https://github.com/Xewus). - ✏ Fix command to install requirements in Windows. PR [#&#8203;9445](https://github.com/tiangolo/fastapi/pull/9445) by [@&#8203;MariiaRomanuik](https://github.com/MariiaRomanuik). - 🌐 Add French translation for `docs/fr/docs/advanced/response-directly.md`. PR [#&#8203;9415](https://github.com/tiangolo/fastapi/pull/9415) by [@&#8203;axel584](https://github.com/axel584). - 🌐 Initiate Czech translation setup. PR [#&#8203;9288](https://github.com/tiangolo/fastapi/pull/9288) by [@&#8203;3p1463k](https://github.com/3p1463k). - ✏ Fix typo in Portuguese docs for `docs/pt/docs/index.md`. PR [#&#8203;9337](https://github.com/tiangolo/fastapi/pull/9337) by [@&#8203;lucasbalieiro](https://github.com/lucasbalieiro). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/response-status-code.md`. PR [#&#8203;9370](https://github.com/tiangolo/fastapi/pull/9370) by [@&#8203;nadia3373](https://github.com/nadia3373). ##### Internal - 🐛 Fix `flask.escape` warning for internal tests. PR [#&#8203;9468](https://github.com/tiangolo/fastapi/pull/9468) by [@&#8203;samuelcolvin](https://github.com/samuelcolvin). - ✅ Refactor 2 tests, for consistency and simplification. PR [#&#8203;9504](https://github.com/tiangolo/fastapi/pull/9504) by [@&#8203;tiangolo](https://github.com/tiangolo). - ✅ Refactor OpenAPI tests, prepare for Pydantic v2. PR [#&#8203;9503](https://github.com/tiangolo/fastapi/pull/9503) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ Bump dawidd6/action-download-artifact from 2.26.0 to 2.27.0. PR [#&#8203;9394](https://github.com/tiangolo/fastapi/pull/9394) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 💚 Disable setup-python pip cache in CI. PR [#&#8203;9438](https://github.com/tiangolo/fastapi/pull/9438) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ Bump pypa/gh-action-pypi-publish from 1.6.4 to 1.8.5. PR [#&#8203;9346](https://github.com/tiangolo/fastapi/pull/9346) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). ### [`v0.95.1`](https://github.com/tiangolo/fastapi/releases/tag/0.95.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.95.0...0.95.1) ##### Fixes - 🐛 Fix using `Annotated` in routers or path operations decorated multiple times. PR [#&#8203;9315](https://github.com/tiangolo/fastapi/pull/9315) by [@&#8203;sharonyogev](https://github.com/sharonyogev). ##### Docs - 🌐 🔠 📄 🐢 Translate docs to Emoji 🥳 🎉 💥 🤯 🤯. PR [#&#8203;5385](https://github.com/tiangolo/fastapi/pull/5385) by [@&#8203;LeeeeT](https://github.com/LeeeeT). - 📝 Add notification message warning about old versions of FastAPI not supporting `Annotated`. PR [#&#8203;9298](https://github.com/tiangolo/fastapi/pull/9298) by [@&#8203;grdworkin](https://github.com/grdworkin). - 📝 Fix typo in `docs/en/docs/advanced/behind-a-proxy.md`. PR [#&#8203;5681](https://github.com/tiangolo/fastapi/pull/5681) by [@&#8203;Leommjr](https://github.com/Leommjr). - ✏ Fix wrong import from typing module in Persian translations for `docs/fa/docs/index.md`. PR [#&#8203;6083](https://github.com/tiangolo/fastapi/pull/6083) by [@&#8203;Kimiaattaei](https://github.com/Kimiaattaei). - ✏️ Fix format, remove unnecessary asterisks in `docs/en/docs/help-fastapi.md`. PR [#&#8203;9249](https://github.com/tiangolo/fastapi/pull/9249) by [@&#8203;armgabrielyan](https://github.com/armgabrielyan). - ✏ Fix typo in `docs/en/docs/tutorial/query-params-str-validations.md`. PR [#&#8203;9272](https://github.com/tiangolo/fastapi/pull/9272) by [@&#8203;nicornk](https://github.com/nicornk). - ✏ Fix typo/bug in inline code example in `docs/en/docs/tutorial/query-params-str-validations.md`. PR [#&#8203;9273](https://github.com/tiangolo/fastapi/pull/9273) by [@&#8203;tim-habitat](https://github.com/tim-habitat). - ✏ Fix typo in `docs/en/docs/tutorial/path-params-numeric-validations.md`. PR [#&#8203;9282](https://github.com/tiangolo/fastapi/pull/9282) by [@&#8203;aadarsh977](https://github.com/aadarsh977). - ✏ Fix typo: 'wll' to 'will' in `docs/en/docs/tutorial/query-params-str-validations.md`. PR [#&#8203;9380](https://github.com/tiangolo/fastapi/pull/9380) by [@&#8203;dasstyxx](https://github.com/dasstyxx). ##### Translations - 🌐 Add French translation for `docs/fr/docs/advanced/index.md`. PR [#&#8203;5673](https://github.com/tiangolo/fastapi/pull/5673) by [@&#8203;axel584](https://github.com/axel584). - 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/body-nested-models.md`. PR [#&#8203;4053](https://github.com/tiangolo/fastapi/pull/4053) by [@&#8203;luccasmmg](https://github.com/luccasmmg). - 🌐 Add Russian translation for `docs/ru/docs/alternatives.md`. PR [#&#8203;5994](https://github.com/tiangolo/fastapi/pull/5994) by [@&#8203;Xewus](https://github.com/Xewus). - 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/extra-models.md`. PR [#&#8203;5912](https://github.com/tiangolo/fastapi/pull/5912) by [@&#8203;LorhanSohaky](https://github.com/LorhanSohaky). - 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/path-operation-configuration.md`. PR [#&#8203;5936](https://github.com/tiangolo/fastapi/pull/5936) by [@&#8203;LorhanSohaky](https://github.com/LorhanSohaky). - 🌐 Add Russian translation for `docs/ru/docs/contributing.md`. PR [#&#8203;6002](https://github.com/tiangolo/fastapi/pull/6002) by [@&#8203;stigsanek](https://github.com/stigsanek). - 🌐 Add Korean translation for `docs/tutorial/dependencies/classes-as-dependencies.md`. PR [#&#8203;9176](https://github.com/tiangolo/fastapi/pull/9176) by [@&#8203;sehwan505](https://github.com/sehwan505). - 🌐 Add Russian translation for `docs/ru/docs/project-generation.md`. PR [#&#8203;9243](https://github.com/tiangolo/fastapi/pull/9243) by [@&#8203;Xewus](https://github.com/Xewus). - 🌐 Add French translation for `docs/fr/docs/index.md`. PR [#&#8203;9265](https://github.com/tiangolo/fastapi/pull/9265) by [@&#8203;frabc](https://github.com/frabc). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/query-params-str-validations.md`. PR [#&#8203;9267](https://github.com/tiangolo/fastapi/pull/9267) by [@&#8203;dedkot01](https://github.com/dedkot01). - 🌐 Add Russian translation for `docs/ru/docs/benchmarks.md`. PR [#&#8203;9271](https://github.com/tiangolo/fastapi/pull/9271) by [@&#8203;Xewus](https://github.com/Xewus). ##### Internal - 🔧 Update sponsors: remove Jina. PR [#&#8203;9388](https://github.com/tiangolo/fastapi/pull/9388) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors, add databento, remove Ines's course and StriveWorks. PR [#&#8203;9351](https://github.com/tiangolo/fastapi/pull/9351) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.95.0`](https://github.com/tiangolo/fastapi/releases/tag/0.95.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.94.1...0.95.0) ##### Highlights This release adds support for dependencies and parameters using `Annotated` and recommends its usage. ✨ This has **several benefits**, one of the main ones is that now the parameters of your functions with `Annotated` would **not be affected** at all. If you call those functions in **other places in your code**, the actual **default values** will be kept, your editor will help you notice missing **required arguments**, Python will require you to pass required arguments at **runtime**, you will be able to **use the same functions** for different things and with different libraries (e.g. **Typer** will soon support `Annotated` too, then you could use the same function for an API and a CLI), etc. Because `Annotated` is **standard Python**, you still get all the **benefits** from editors and tools, like **autocompletion**, **inline errors**, etc. One of the **biggest benefits** is that now you can create `Annotated` dependencies that are then shared by multiple *path operation functions*, this will allow you to **reduce** a lot of **code duplication** in your codebase, while keeping all the support from editors and tools. For example, you could have code like this: ```Python def get_current_user(token: str): ### authenticate user return User() @&#8203;app.get("/items/") def read_items(user: User = Depends(get_current_user)): ... @&#8203;app.post("/items/") def create_item(*, user: User = Depends(get_current_user), item: Item): ... @&#8203;app.get("/items/{item_id}") def read_item(*, user: User = Depends(get_current_user), item_id: int): ... @&#8203;app.delete("/items/{item_id}") def delete_item(*, user: User = Depends(get_current_user), item_id: int): ... ``` There's a bit of code duplication for the dependency: ```Python user: User = Depends(get_current_user) ``` ...the bigger the codebase, the more noticeable it is. Now you can create an annotated dependency once, like this: ```Python CurrentUser = Annotated[User, Depends(get_current_user)] ``` And then you can reuse this `Annotated` dependency: ```Python CurrentUser = Annotated[User, Depends(get_current_user)] @&#8203;app.get("/items/") def read_items(user: CurrentUser): ... @&#8203;app.post("/items/") def create_item(user: CurrentUser, item: Item): ... @&#8203;app.get("/items/{item_id}") def read_item(user: CurrentUser, item_id: int): ... @&#8203;app.delete("/items/{item_id}") def delete_item(user: CurrentUser, item_id: int): ... ``` ...and `CurrentUser` has all the typing information as `User`, so your editor will work as expected (autocompletion and everything), and **FastAPI** will be able to understand the dependency defined in `Annotated`. 😎 Roughly **all the docs** have been rewritten to use `Annotated` as the main way to declare **parameters** and **dependencies**. All the **examples** in the docs now include a version with `Annotated` and a version without it, for each of the specific Python versions (when there are small differences/improvements in more recent versions). There were around 23K new lines added between docs, examples, and tests. 🚀 The key updated docs are: - Python Types Intro: - [Type Hints with Metadata Annotations](https://fastapi.tiangolo.com/python-types/#type-hints-with-metadata-annotations). - Tutorial: - [Query Parameters and String Validations - Additional validation](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#additional-validation) - [Advantages of `Annotated`](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#advantages-of-annotated) - [Path Parameters and Numeric Validations - Order the parameters as you need, tricks](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#order-the-parameters-as-you-need-tricks) - [Better with `Annotated`](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#better-with-annotated) - [Dependencies - First Steps - Share `Annotated` dependencies](https://fastapi.tiangolo.com/tutorial/dependencies/#share-annotated-dependencies) Special thanks to [@&#8203;nzig](https://github.com/nzig) for the core implementation and to [@&#8203;adriangb](https://github.com/adriangb) for the inspiration and idea with [Xpresso](https://github.com/adriangb/xpresso)! 🚀 ##### Features - ✨Add support for PEP-593 `Annotated` for specifying dependencies and parameters. PR [#&#8203;4871](https://github.com/tiangolo/fastapi/pull/4871) by [@&#8203;nzig](https://github.com/nzig). ##### Docs - 📝 Tweak tip recommending `Annotated` in docs. PR [#&#8203;9270](https://github.com/tiangolo/fastapi/pull/9270) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Update order of examples, latest Python version first, and simplify version tab names. PR [#&#8203;9269](https://github.com/tiangolo/fastapi/pull/9269) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests. PR [#&#8203;9268](https://github.com/tiangolo/fastapi/pull/9268) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.94.1`](https://github.com/tiangolo/fastapi/releases/tag/0.94.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.94.0...0.94.1) ##### Fixes - 🎨 Fix types for lifespan, upgrade Starlette to 0.26.1. PR [#&#8203;9245](https://github.com/tiangolo/fastapi/pull/9245) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.94.0`](https://github.com/tiangolo/fastapi/releases/tag/0.94.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.93.0...0.94.0) ##### Upgrades - ⬆ Upgrade python-multipart to support 0.0.6. PR [#&#8203;9212](https://github.com/tiangolo/fastapi/pull/9212) by [@&#8203;musicinmybrain](https://github.com/musicinmybrain). - ⬆️ Upgrade Starlette version, support new `lifespan` with state. PR [#&#8203;9239](https://github.com/tiangolo/fastapi/pull/9239) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Docs - 📝 Update Sentry link in docs. PR [#&#8203;9218](https://github.com/tiangolo/fastapi/pull/9218) by [@&#8203;smeubank](https://github.com/smeubank). ##### Translations - 🌐 Add Russian translation for `docs/ru/docs/history-design-future.md`. PR [#&#8203;5986](https://github.com/tiangolo/fastapi/pull/5986) by [@&#8203;Xewus](https://github.com/Xewus). ##### Internal - ➕ Add `pydantic` to PyPI classifiers. PR [#&#8203;5914](https://github.com/tiangolo/fastapi/pull/5914) by [@&#8203;yezz123](https://github.com/yezz123). - ⬆ Bump black from 22.10.0 to 23.1.0. PR [#&#8203;5953](https://github.com/tiangolo/fastapi/pull/5953) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump types-ujson from 5.6.0.0 to 5.7.0.1. PR [#&#8203;6027](https://github.com/tiangolo/fastapi/pull/6027) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump dawidd6/action-download-artifact from 2.24.3 to 2.26.0. PR [#&#8203;6034](https://github.com/tiangolo/fastapi/pull/6034) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ \[pre-commit.ci] pre-commit autoupdate. PR [#&#8203;5709](https://github.com/tiangolo/fastapi/pull/5709) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci). ### [`v0.93.0`](https://github.com/tiangolo/fastapi/releases/tag/0.93.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.92.0...0.93.0) ##### Features - ✨ Add support for `lifespan` async context managers (superseding `startup` and `shutdown` events). Initial PR [#&#8203;2944](https://github.com/tiangolo/fastapi/pull/2944) by [@&#8203;uSpike](https://github.com/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: ```Python from contextlib import asynccontextmanager from fastapi import FastAPI def fake_answer_to_everything_ml_model(x: float): return x * 42 ml_models = {} @&#8203;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) @&#8203;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](https://fastapi.tiangolo.com/advanced/events/). ##### Docs - ✏ Fix formatting in `docs/en/docs/tutorial/metadata.md` for `ReDoc`. PR [#&#8203;6005](https://github.com/tiangolo/fastapi/pull/6005) by [@&#8203;eykamp](https://github.com/eykamp). ##### Translations - 🌐 Tamil translations - initial setup. PR [#&#8203;5564](https://github.com/tiangolo/fastapi/pull/5564) by [@&#8203;gusty1g](https://github.com/gusty1g). - 🌐 Add French translation for `docs/fr/docs/advanced/path-operation-advanced-configuration.md`. PR [#&#8203;9221](https://github.com/tiangolo/fastapi/pull/9221) by [@&#8203;axel584](https://github.com/axel584). - 🌐 Add French translation for `docs/tutorial/debugging.md`. PR [#&#8203;9175](https://github.com/tiangolo/fastapi/pull/9175) by [@&#8203;frabc](https://github.com/frabc). - 🌐 Initiate Armenian translation setup. PR [#&#8203;5844](https://github.com/tiangolo/fastapi/pull/5844) by [@&#8203;har8](https://github.com/har8). - 🌐 Add French translation for `deployment/manually.md`. PR [#&#8203;3693](https://github.com/tiangolo/fastapi/pull/3693) by [@&#8203;rjNemo](https://github.com/rjNemo). ##### Internal - 👷 Update translation bot messages. PR [#&#8203;9206](https://github.com/tiangolo/fastapi/pull/9206) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Update translations bot to use Discussions, and notify when a PR is done. PR [#&#8203;9183](https://github.com/tiangolo/fastapi/pull/9183) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors-badges. PR [#&#8203;9182](https://github.com/tiangolo/fastapi/pull/9182) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👥 Update FastAPI People. PR [#&#8203;9181](https://github.com/tiangolo/fastapi/pull/9181) by [@&#8203;github-actions\[bot\]](https://github.com/apps/github-actions). - 🔊 Log GraphQL errors in FastAPI People, because it returns 200, with a payload with an error. PR [#&#8203;9171](https://github.com/tiangolo/fastapi/pull/9171) by [@&#8203;tiangolo](https://github.com/tiangolo). - 💚 Fix/workaround GitHub Actions in Docker with git for FastAPI People. PR [#&#8203;9169](https://github.com/tiangolo/fastapi/pull/9169) by [@&#8203;tiangolo](https://github.com/tiangolo). - ♻️ Refactor FastAPI Experts to use only discussions now that questions are migrated. PR [#&#8203;9165](https://github.com/tiangolo/fastapi/pull/9165) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆️ Upgrade analytics. PR [#&#8203;6025](https://github.com/tiangolo/fastapi/pull/6025) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆️ Upgrade and re-enable installing Typer-CLI. PR [#&#8203;6008](https://github.com/tiangolo/fastapi/pull/6008) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.92.0`](https://github.com/tiangolo/fastapi/releases/tag/0.92.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.91.0...0.92.0) 🚨 This is a security fix. Please upgrade as soon as possible. ##### Upgrades - ⬆️ Upgrade Starlette to 0.25.0. PR [#&#8203;5996](https://github.com/tiangolo/fastapi/pull/5996) by [@&#8203;tiangolo](https://github.com/tiangolo). - This solves a vulnerability that could allow denial of service attacks by using many small multipart fields/files (parts), consuming high CPU and memory. - Only applications using forms (e.g. file uploads) could be affected. - For most cases, upgrading won't have any breaking changes. ### [`v0.91.0`](https://github.com/tiangolo/fastapi/releases/tag/0.91.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.90.1...0.91.0) ##### Upgrades - ⬆️ Upgrade Starlette version to `0.24.0` and refactor internals for compatibility. PR [#&#8203;5985](https://github.com/tiangolo/fastapi/pull/5985) by [@&#8203;tiangolo](https://github.com/tiangolo). - This can solve nuanced errors when using middlewares. Before Starlette `0.24.0`, a new instance of each middleware class would be created when a new middleware was added. That normally was not a problem, unless the middleware class expected to be created only once, with only one instance, that happened in some cases. This upgrade would solve those cases (thanks [@&#8203;adriangb](https://github.com/adriangb)! Starlette PR [#&#8203;2017](https://github.com/encode/starlette/pull/2017)). Now the middleware class instances are created once, right before the first request (the first time the app is called). - If you depended on that previous behavior, you might need to update your code. As always, make sure your tests pass before merging the upgrade. ### [`v0.90.1`](https://github.com/tiangolo/fastapi/releases/tag/0.90.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.90.0...0.90.1) ##### Upgrades - ⬆️ Upgrade Starlette range to allow 0.23.1. PR [#&#8203;5980](https://github.com/tiangolo/fastapi/pull/5980) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Docs - ✏ Tweak wording to clarify `docs/en/docs/project-generation.md`. PR [#&#8203;5930](https://github.com/tiangolo/fastapi/pull/5930) by [@&#8203;chandra-deb](https://github.com/chandra-deb). - ✏ Update Pydantic GitHub URLs. PR [#&#8203;5952](https://github.com/tiangolo/fastapi/pull/5952) by [@&#8203;yezz123](https://github.com/yezz123). - 📝 Add opinion from Cisco. PR [#&#8203;5981](https://github.com/tiangolo/fastapi/pull/5981) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Translations - 🌐 Add Russian translation for `docs/ru/docs/tutorial/cookie-params.md`. PR [#&#8203;5890](https://github.com/tiangolo/fastapi/pull/5890) by [@&#8203;bnzone](https://github.com/bnzone). ##### Internal - ✏ Update `zip-docs.sh` internal script, remove extra space. PR [#&#8203;5931](https://github.com/tiangolo/fastapi/pull/5931) by [@&#8203;JuanPerdomo00](https://github.com/JuanPerdomo00). ### [`v0.90.0`](https://github.com/tiangolo/fastapi/releases/tag/0.90.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.89.1...0.90.0) ##### Upgrades - ⬆️ Bump Starlette from 0.22.0 to 0.23.0. Initial PR [#&#8203;5739](https://github.com/tiangolo/fastapi/pull/5739) by [@&#8203;Kludex](https://github.com/Kludex). ##### Docs - 📝 Add article "Tortoise ORM / FastAPI 整合快速筆記" to External Links. PR [#&#8203;5496](https://github.com/tiangolo/fastapi/pull/5496) by [@&#8203;Leon0824](https://github.com/Leon0824). - 👥 Update FastAPI People. PR [#&#8203;5954](https://github.com/tiangolo/fastapi/pull/5954) by [@&#8203;github-actions\[bot\]](https://github.com/apps/github-actions). - 📝 Micro-tweak help docs. PR [#&#8203;5960](https://github.com/tiangolo/fastapi/pull/5960) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update new issue chooser to direct to GitHub Discussions. PR [#&#8203;5948](https://github.com/tiangolo/fastapi/pull/5948) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Recommend GitHub Discussions for questions. PR [#&#8203;5944](https://github.com/tiangolo/fastapi/pull/5944) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Translations - 🌐 Add Russian translation for `docs/ru/docs/tutorial/body-fields.md`. PR [#&#8203;5898](https://github.com/tiangolo/fastapi/pull/5898) by [@&#8203;simatheone](https://github.com/simatheone). - 🌐 Add Russian translation for `docs/ru/docs/help-fastapi.md`. PR [#&#8203;5970](https://github.com/tiangolo/fastapi/pull/5970) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/static-files.md`. PR [#&#8203;5858](https://github.com/tiangolo/fastapi/pull/5858) by [@&#8203;batlopes](https://github.com/batlopes). - 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/encoder.md`. PR [#&#8203;5525](https://github.com/tiangolo/fastapi/pull/5525) by [@&#8203;felipebpl](https://github.com/felipebpl). - 🌐 Add Russian translation for `docs/ru/docs/contributing.md`. PR [#&#8203;5870](https://github.com/tiangolo/fastapi/pull/5870) by [@&#8203;Xewus](https://github.com/Xewus). ##### Internal - ⬆️ Upgrade Ubuntu version for docs workflow. PR [#&#8203;5971](https://github.com/tiangolo/fastapi/pull/5971) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors badges. PR [#&#8203;5943](https://github.com/tiangolo/fastapi/pull/5943) by [@&#8203;tiangolo](https://github.com/tiangolo). - ✨ Compute FastAPI Experts including GitHub Discussions. PR [#&#8203;5941](https://github.com/tiangolo/fastapi/pull/5941) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆️ Upgrade isort and update pre-commit. PR [#&#8203;5940](https://github.com/tiangolo/fastapi/pull/5940) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Add template for questions in Discussions. PR [#&#8203;5920](https://github.com/tiangolo/fastapi/pull/5920) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update Sponsor Budget Insight to Powens. PR [#&#8203;5916](https://github.com/tiangolo/fastapi/pull/5916) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update GitHub Sponsors badge data. PR [#&#8203;5915](https://github.com/tiangolo/fastapi/pull/5915) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.89.1`](https://github.com/tiangolo/fastapi/releases/tag/0.89.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.89.0...0.89.1) ##### Fixes - 🐛 Ignore Response classes on return annotation. PR [#&#8203;5855](https://github.com/tiangolo/fastapi/pull/5855) by [@&#8203;Kludex](https://github.com/Kludex). See the new docs in the PR below. ##### Docs - 📝 Update docs and examples for Response Model with Return Type Annotations, and update runtime error. PR [#&#8203;5873](https://github.com/tiangolo/fastapi/pull/5873) by [@&#8203;tiangolo](https://github.com/tiangolo). New docs at [Response Model - Return Type: Other Return Type Annotations](https://fastapi.tiangolo.com/tutorial/response-model/#other-return-type-annotations). - 📝 Add External Link: FastAPI lambda container: serverless simplified. PR [#&#8203;5784](https://github.com/tiangolo/fastapi/pull/5784) by [@&#8203;rafrasenberg](https://github.com/rafrasenberg). ##### Translations - 🌐 Add Turkish translation for `docs/tr/docs/tutorial/first_steps.md`. PR [#&#8203;5691](https://github.com/tiangolo/fastapi/pull/5691) by [@&#8203;Kadermiyanyedi](https://github.com/Kadermiyanyedi). ### [`v0.89.0`](https://github.com/tiangolo/fastapi/releases/tag/0.89.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.88.0...0.89.0) ##### Features - ✨ Add support for function return type annotations to declare the `response_model`. Initial PR [#&#8203;1436](https://github.com/tiangolo/fastapi/pull/1436) by [@&#8203;uriyyo](https://github.com/uriyyo). Now you can declare the return type / `response_model` in the function return type annotation: ```python from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float @&#8203;app.get("/items/") async def read_items() -> list[Item]: return [ Item(name="Portal Gun", price=42.0), Item(name="Plumbus", price=32.0), ] ``` FastAPI will use the return type annotation to perform: - Data validation - Automatic documentation - It could power automatic client generators - **Data filtering** Before this version it was only supported via the `response_model` parameter. Read more about it in the new docs: [Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/). ##### Docs - 📝 Add External Link: Authorization on FastAPI with Casbin. PR [#&#8203;5712](https://github.com/tiangolo/fastapi/pull/5712) by [@&#8203;Xhy-5000](https://github.com/Xhy-5000). - ✏ Fix typo in `docs/en/docs/async.md`. PR [#&#8203;5785](https://github.com/tiangolo/fastapi/pull/5785) by [@&#8203;Kingdageek](https://github.com/Kingdageek). - ✏ Fix typo in `docs/en/docs/deployment/concepts.md`. PR [#&#8203;5824](https://github.com/tiangolo/fastapi/pull/5824) by [@&#8203;kelbyfaessler](https://github.com/kelbyfaessler). ##### Translations - 🌐 Add Russian translation for `docs/ru/docs/fastapi-people.md`. PR [#&#8203;5577](https://github.com/tiangolo/fastapi/pull/5577) by [@&#8203;Xewus](https://github.com/Xewus). - 🌐 Fix typo in Chinese translation for `docs/zh/docs/benchmarks.md`. PR [#&#8203;4269](https://github.com/tiangolo/fastapi/pull/4269) by [@&#8203;15027668g](https://github.com/15027668g). - 🌐 Add Korean translation for `docs/tutorial/cors.md`. PR [#&#8203;3764](https://github.com/tiangolo/fastapi/pull/3764) by [@&#8203;NinaHwang](https://github.com/NinaHwang). ##### Internal - ⬆ Update coverage\[toml] requirement from <7.0,>=6.5.0 to >=6.5.0,<8.0. PR [#&#8203;5801](https://github.com/tiangolo/fastapi/pull/5801) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Update uvicorn\[standard] requirement from <0.19.0,>=0.12.0 to >=0.12.0,<0.21.0 for development. PR [#&#8203;5795](https://github.com/tiangolo/fastapi/pull/5795) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump dawidd6/action-download-artifact from 2.24.2 to 2.24.3. PR [#&#8203;5842](https://github.com/tiangolo/fastapi/pull/5842) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 👥 Update FastAPI People. PR [#&#8203;5825](https://github.com/tiangolo/fastapi/pull/5825) by [@&#8203;github-actions\[bot\]](https://github.com/apps/github-actions). - ⬆ Bump types-ujson from 5.5.0 to 5.6.0.0. PR [#&#8203;5735](https://github.com/tiangolo/fastapi/pull/5735) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump pypa/gh-action-pypi-publish from 1.5.2 to 1.6.4. PR [#&#8203;5750](https://github.com/tiangolo/fastapi/pull/5750) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 👷 Add GitHub Action gate/check. PR [#&#8203;5492](https://github.com/tiangolo/fastapi/pull/5492) by [@&#8203;webknjaz](https://github.com/webknjaz). - 🔧 Update sponsors, add Svix. PR [#&#8203;5848](https://github.com/tiangolo/fastapi/pull/5848) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Remove Doist sponsor. PR [#&#8203;5847](https://github.com/tiangolo/fastapi/pull/5847) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ Update sqlalchemy requirement from <=1.4.41,>=1.3.18 to >=1.3.18,<1.4.43. PR [#&#8203;5540](https://github.com/tiangolo/fastapi/pull/5540) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump nwtgck/actions-netlify from 1.2.4 to 2.0.0. PR [#&#8203;5757](https://github.com/tiangolo/fastapi/pull/5757) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 👷 Refactor CI artifact upload/download for docs previews. PR [#&#8203;5793](https://github.com/tiangolo/fastapi/pull/5793) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ Bump pypa/gh-action-pypi-publish from 1.5.1 to 1.5.2. PR [#&#8203;5714](https://github.com/tiangolo/fastapi/pull/5714) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 👥 Update FastAPI People. PR [#&#8203;5722](https://github.com/tiangolo/fastapi/pull/5722) by [@&#8203;github-actions\[bot\]](https://github.com/apps/github-actions). - 🔧 Update sponsors, disable course bundle. PR [#&#8203;5713](https://github.com/tiangolo/fastapi/pull/5713) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ Update typer\[all] requirement from <0.7.0,>=0.6.1 to >=0.6.1,<0.8.0. PR [#&#8203;5639](https://github.com/tiangolo/fastapi/pull/5639) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). ### [`v0.88.0`](https://github.com/tiangolo/fastapi/releases/tag/0.88.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.87.0...0.88.0) ##### Upgrades - ⬆ Bump Starlette to version `0.22.0` to fix bad encoding for query parameters in new `TestClient`. PR [#&#8203;5659](https://github.com/tiangolo/fastapi/pull/5659) by [@&#8203;azogue](https://github.com/azogue). ##### Docs - ✏️ Fix typo in docs for `docs/en/docs/advanced/middleware.md`. PR [#&#8203;5376](https://github.com/tiangolo/fastapi/pull/5376) by [@&#8203;rifatrakib](https://github.com/rifatrakib). ##### Translations - 🌐 Add Portuguese translation for `docs/pt/docs/deployment/docker.md`. PR [#&#8203;5663](https://github.com/tiangolo/fastapi/pull/5663) by [@&#8203;ayr-ton](https://github.com/ayr-ton). ##### Internal - 👷 Tweak build-docs to improve CI performance. PR [#&#8203;5699](https://github.com/tiangolo/fastapi/pull/5699) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ \[pre-commit.ci] pre-commit autoupdate. PR [#&#8203;5566](https://github.com/tiangolo/fastapi/pull/5566) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci). - ⬆️ Upgrade Ruff. PR [#&#8203;5698](https://github.com/tiangolo/fastapi/pull/5698) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Remove pip cache for Smokeshow as it depends on a requirements.txt. PR [#&#8203;5700](https://github.com/tiangolo/fastapi/pull/5700) by [@&#8203;tiangolo](https://github.com/tiangolo). - 💚 Fix pip cache for Smokeshow. PR [#&#8203;5697](https://github.com/tiangolo/fastapi/pull/5697) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Fix and tweak CI cache handling. PR [#&#8203;5696](https://github.com/tiangolo/fastapi/pull/5696) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Update `setup-python` action in tests to use new caching feature. PR [#&#8203;5680](https://github.com/tiangolo/fastapi/pull/5680) by [@&#8203;madkinsz](https://github.com/madkinsz). - ⬆ Bump black from 22.8.0 to 22.10.0. PR [#&#8203;5569](https://github.com/tiangolo/fastapi/pull/5569) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). ### [`v0.87.0`](https://github.com/tiangolo/fastapi/releases/tag/0.87.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.86.0...0.87.0) Highlights of this release: - [Upgraded Starlette](https://github.com/encode/starlette/releases/tag/0.21.0) - Now the `TestClient` is based on HTTPX instead of Requests. 🚀 - There are some possible **breaking changes** in the `TestClient` usage, but [@&#8203;Kludex](https://github.com/Kludex) built [bump-testclient](https://github.com/Kludex/bump-testclient) to help you automatize migrating your tests. Make sure you are using Git and that you can undo any unnecessary changes (false positive changes, etc) before using `bump-testclient`. - New [WebSocketException (and docs)](https://fastapi.tiangolo.com/advanced/websockets/#using-depends-and-others), re-exported from Starlette. - Upgraded and relaxed dependencies for package extras `all` (including new Uvicorn version), when you install `"fastapi[all]"`. - New docs about how to [**Help Maintain FastAPI**](https://fastapi.tiangolo.com/help-fastapi/#help-maintain-fastapi). ##### Features - ⬆️ Upgrade and relax dependencies for extras "all". PR [#&#8203;5634](https://github.com/tiangolo/fastapi/pull/5634) by [@&#8203;tiangolo](https://github.com/tiangolo). - ✨ Re-export Starlette's `WebSocketException` and add it to docs. PR [#&#8203;5629](https://github.com/tiangolo/fastapi/pull/5629) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Update references to Requests for tests to HTTPX, and add HTTPX to extras. PR [#&#8203;5628](https://github.com/tiangolo/fastapi/pull/5628) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ Upgrade Starlette to `0.21.0`, including the new [`TestClient` based on HTTPX](https://github.com/encode/starlette/releases/tag/0.21.0). PR [#&#8203;5471](https://github.com/tiangolo/fastapi/pull/5471) by [@&#8203;pawelrubin](https://github.com/pawelrubin). ##### Docs - ✏️ Tweak Help FastAPI from PR review after merging. PR [#&#8203;5633](https://github.com/tiangolo/fastapi/pull/5633) by [@&#8203;tiangolo](https://github.com/tiangolo). - ✏️ Clarify docs on CORS. PR [#&#8203;5627](https://github.com/tiangolo/fastapi/pull/5627) by [@&#8203;paxcodes](https://github.com/paxcodes). - 📝 Update Help FastAPI: Help Maintain FastAPI. PR [#&#8203;5632](https://github.com/tiangolo/fastapi/pull/5632) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Translations - 🌐 Fix highlight lines for Japanese translation for `docs/tutorial/query-params.md`. PR [#&#8203;2969](https://github.com/tiangolo/fastapi/pull/2969) by [@&#8203;ftnext](https://github.com/ftnext). - 🌐 Add French translation for `docs/fr/docs/advanced/additional-status-code.md`. PR [#&#8203;5477](https://github.com/tiangolo/fastapi/pull/5477) by [@&#8203;axel584](https://github.com/axel584). - 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/request-forms-and-files.md`. PR [#&#8203;5579](https://github.com/tiangolo/fastapi/pull/5579) by [@&#8203;batlopes](https://github.com/batlopes). - 🌐 Add Japanese translation for `docs/ja/docs/advanced/websockets.md`. PR [#&#8203;4983](https://github.com/tiangolo/fastapi/pull/4983) by [@&#8203;xryuseix](https://github.com/xryuseix). ##### Internal - ✨ Use Ruff for linting. PR [#&#8203;5630](https://github.com/tiangolo/fastapi/pull/5630) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🛠 Add Arabic issue number to Notify Translations GitHub Action. PR [#&#8203;5610](https://github.com/tiangolo/fastapi/pull/5610) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ Bump dawidd6/action-download-artifact from 2.24.1 to 2.24.2. PR [#&#8203;5609](https://github.com/tiangolo/fastapi/pull/5609) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump dawidd6/action-download-artifact from 2.24.0 to 2.24.1. PR [#&#8203;5603](https://github.com/tiangolo/fastapi/pull/5603) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 📝 Update coverage badge to use Samuel Colvin's Smokeshow. PR [#&#8203;5585](https://github.com/tiangolo/fastapi/pull/5585) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.86.0`](https://github.com/tiangolo/fastapi/releases/tag/0.86.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.85.2...0.86.0) ##### Features - ⬆ Add Python 3.11 to the officially supported versions. PR [#&#8203;5587](https://github.com/tiangolo/fastapi/pull/5587) by [@&#8203;tiangolo](https://github.com/tiangolo). - ✅ Enable tests for Python 3.11. PR [#&#8203;4881](https://github.com/tiangolo/fastapi/pull/4881) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Fixes - 🐛 Close FormData (uploaded files) after the request is done. PR [#&#8203;5465](https://github.com/tiangolo/fastapi/pull/5465) by [@&#8203;adriangb](https://github.com/adriangb). ##### Docs - ✏ Fix typo in `docs/en/docs/tutorial/security/oauth2-jwt.md`. PR [#&#8203;5584](https://github.com/tiangolo/fastapi/pull/5584) by [@&#8203;vivekashok1221](https://github.com/vivekashok1221). ##### Translations - 🌐 Update wording in Chinese translation for `docs/zh/docs/python-types.md`. PR [#&#8203;5416](https://github.com/tiangolo/fastapi/pull/5416) by [@&#8203;supercaizehua](https://github.com/supercaizehua). - 🌐 Add Russian translation for `docs/ru/docs/deployment/index.md`. PR [#&#8203;5336](https://github.com/tiangolo/fastapi/pull/5336) by [@&#8203;Xewus](https://github.com/Xewus). - 🌐 Update Chinese translation for `docs/tutorial/security/oauth2-jwt.md`. PR [#&#8203;3846](https://github.com/tiangolo/fastapi/pull/3846) by [@&#8203;jaystone776](https://github.com/jaystone776). ##### Internal - 👷 Update FastAPI People to exclude bots: pre-commit-ci, dependabot. PR [#&#8203;5586](https://github.com/tiangolo/fastapi/pull/5586) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🎨 Format OpenAPI JSON in `test_starlette_exception.py`. PR [#&#8203;5379](https://github.com/tiangolo/fastapi/pull/5379) by [@&#8203;iudeen](https://github.com/iudeen). - 👷 Switch from Codecov to Smokeshow plus pytest-cov to pure coverage for internal tests. PR [#&#8203;5583](https://github.com/tiangolo/fastapi/pull/5583) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👥 Update FastAPI People. PR [#&#8203;5571](https://github.com/tiangolo/fastapi/pull/5571) by [@&#8203;github-actions\[bot\]](https://github.com/apps/github-actions). ### [`v0.85.2`](https://github.com/tiangolo/fastapi/releases/tag/0.85.2) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.85.1...0.85.2) **Note**: this release doesn't affect final users, it's mainly internal. It unlocks Pydanitc work with the integration that runs FastAPI's tests in Pydantic's CI. ##### Docs - ✏ Fix grammar and add helpful links to dependencies in `docs/en/docs/async.md`. PR [#&#8203;5432](https://github.com/tiangolo/fastapi/pull/5432) by [@&#8203;pamelafox](https://github.com/pamelafox). - ✏ Fix broken link in `alternatives.md`. PR [#&#8203;5455](https://github.com/tiangolo/fastapi/pull/5455) by [@&#8203;su-shubham](https://github.com/su-shubham). - ✏ Fix typo in docs about contributing, for compatibility with `pip` in Zsh. PR [#&#8203;5523](https://github.com/tiangolo/fastapi/pull/5523) by [@&#8203;zhangbo2012](https://github.com/zhangbo2012). - 📝 Fix typo in docs with examples for Python 3.10 instead of 3.9. PR [#&#8203;5545](https://github.com/tiangolo/fastapi/pull/5545) by [@&#8203;feliciss](https://github.com/feliciss). ##### Translations - 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/request-forms.md`. PR [#&#8203;4934](https://github.com/tiangolo/fastapi/pull/4934) by [@&#8203;batlopes](https://github.com/batlopes). - 🌐 Add Chinese translation for `docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md`. PR [#&#8203;4971](https://github.com/tiangolo/fastapi/pull/4971) by [@&#8203;Zssaer](https://github.com/Zssaer). - 🌐 Add French translation for `deployment/deta.md`. PR [#&#8203;3692](https://github.com/tiangolo/fastapi/pull/3692) by [@&#8203;rjNemo](https://github.com/rjNemo). - 🌐 Update Chinese translation for `docs/zh/docs/tutorial/query-params-str-validations.md`. PR [#&#8203;5255](https://github.com/tiangolo/fastapi/pull/5255) by [@&#8203;hjlarry](https://github.com/hjlarry). - 🌐 Add Chinese translation for `docs/zh/docs/tutorial/sql-databases.md`. PR [#&#8203;4999](https://github.com/tiangolo/fastapi/pull/4999) by [@&#8203;Zssaer](https://github.com/Zssaer). - 🌐 Add Chinese translation for `docs/zh/docs/advanced/wsgi.md`. PR [#&#8203;4505](https://github.com/tiangolo/fastapi/pull/4505) by [@&#8203;ASpathfinder](https://github.com/ASpathfinder). - 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/body-multiple-params.md`. PR [#&#8203;4111](https://github.com/tiangolo/fastapi/pull/4111) by [@&#8203;lbmendes](https://github.com/lbmendes). - 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/path-params-numeric-validations.md`. PR [#&#8203;4099](https://github.com/tiangolo/fastapi/pull/4099) by [@&#8203;lbmendes](https://github.com/lbmendes). - 🌐 Add French translation for `deployment/versions.md`. PR [#&#8203;3690](https://github.com/tiangolo/fastapi/pull/3690) by [@&#8203;rjNemo](https://github.com/rjNemo). - 🌐 Add French translation for `docs/fr/docs/help-fastapi.md`. PR [#&#8203;2233](https://github.com/tiangolo/fastapi/pull/2233) by [@&#8203;JulianMaurin](https://github.com/JulianMaurin). - 🌐 Fix typo in Chinese translation for `docs/zh/docs/tutorial/security/first-steps.md`. PR [#&#8203;5530](https://github.com/tiangolo/fastapi/pull/5530) by [@&#8203;yuki1sntSnow](https://github.com/yuki1sntSnow). - 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/response-status-code.md`. PR [#&#8203;4922](https://github.com/tiangolo/fastapi/pull/4922) by [@&#8203;batlopes](https://github.com/batlopes). - 🔧 Add config for Tamil translations. PR [#&#8203;5563](https://github.com/tiangolo/fastapi/pull/5563) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Internal - ⬆ Bump internal dependency mypy from 0.971 to 0.982. PR [#&#8203;5541](https://github.com/tiangolo/fastapi/pull/5541) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump nwtgck/actions-netlify from 1.2.3 to 1.2.4. PR [#&#8203;5507](https://github.com/tiangolo/fastapi/pull/5507) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump internal dependency types-ujson from 5.4.0 to 5.5.0. PR [#&#8203;5537](https://github.com/tiangolo/fastapi/pull/5537) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump dawidd6/action-download-artifact from 2.23.0 to 2.24.0. PR [#&#8203;5508](https://github.com/tiangolo/fastapi/pull/5508) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Update internal dependency pytest-cov requirement from <4.0.0,>=2.12.0 to >=2.12.0,<5.0.0. PR [#&#8203;5539](https://github.com/tiangolo/fastapi/pull/5539) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ \[pre-commit.ci] pre-commit autoupdate. PR [#&#8203;5536](https://github.com/tiangolo/fastapi/pull/5536) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci). - 🐛 Fix internal Trio test warnings. PR [#&#8203;5547](https://github.com/tiangolo/fastapi/pull/5547) by [@&#8203;samuelcolvin](https://github.com/samuelcolvin). - ⬆ \[pre-commit.ci] pre-commit autoupdate. PR [#&#8203;5408](https://github.com/tiangolo/fastapi/pull/5408) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci). - ⬆️ Upgrade Typer to include Rich in scripts for docs. PR [#&#8203;5502](https://github.com/tiangolo/fastapi/pull/5502) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🐛 Fix calling `mkdocs` for languages as a subprocess to fix/enable MkDocs Material search plugin. PR [#&#8203;5501](https://github.com/tiangolo/fastapi/pull/5501) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.85.1`](https://github.com/tiangolo/fastapi/releases/tag/0.85.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.85.0...0.85.1) ##### Fixes - 🐛 Fix support for strings in OpenAPI status codes: `default`, `1XX`, `2XX`, `3XX`, `4XX`, `5XX`. PR [#&#8203;5187](https://github.com/tiangolo/fastapi/pull/5187) by [@&#8203;JarroVGIT](https://github.com/JarroVGIT). ##### Docs - 📝 Add WayScript x FastAPI Tutorial to External Links section. PR [#&#8203;5407](https://github.com/tiangolo/fastapi/pull/5407) by [@&#8203;moneeka](https://github.com/moneeka). ##### Internal - 👥 Update FastAPI People. PR [#&#8203;5447](https://github.com/tiangolo/fastapi/pull/5447) by [@&#8203;github-actions\[bot\]](https://github.com/apps/github-actions). - 🔧 Disable Material for MkDocs search plugin. PR [#&#8203;5495](https://github.com/tiangolo/fastapi/pull/5495) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔇 Ignore Trio warning in tests for CI. PR [#&#8203;5483](https://github.com/tiangolo/fastapi/pull/5483) by [@&#8203;samuelcolvin](https://github.com/samuelcolvin). ### [`v0.85.0`](https://github.com/tiangolo/fastapi/releases/tag/0.85.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.84.0...0.85.0) ##### Features - ⬆ Upgrade version required of Starlette from `0.19.1` to `0.20.4`. Initial PR [#&#8203;4820](https://github.com/tiangolo/fastapi/pull/4820) by [@&#8203;Kludex](https://github.com/Kludex). - This includes several bug fixes in Starlette. - ⬆️ Upgrade Uvicorn max version in public extras: all. From `>=0.12.0,<0.18.0` to `>=0.12.0,<0.19.0`. PR [#&#8203;5401](https://github.com/tiangolo/fastapi/pull/5401) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Internal - ⬆️ Upgrade dependencies for doc and dev internal extras: Typer, Uvicorn. PR [#&#8203;5400](https://github.com/tiangolo/fastapi/pull/5400) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆️ Upgrade test dependencies: Black, HTTPX, databases, types-ujson. PR [#&#8203;5399](https://github.com/tiangolo/fastapi/pull/5399) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆️ Upgrade mypy and tweak internal type annotations. PR [#&#8203;5398](https://github.com/tiangolo/fastapi/pull/5398) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update test dependencies, upgrade Pytest, move dependencies from dev to test. PR [#&#8203;5396](https://github.com/tiangolo/fastapi/pull/5396) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.84.0`](https://github.com/tiangolo/fastapi/releases/tag/0.84.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.83.0...0.84.0) ##### Breaking Changes This version of FastAPI drops support for Python 3.6. 🔥 Please upgrade to a supported version of Python (3.7 or above), Python 3.6 reached the end-of-life a long time ago. 😅☠ - 🔧 Update package metadata, drop support for Python 3.6, move build internals from Flit to Hatch. PR [#&#8203;5240](https://github.com/tiangolo/fastapi/pull/5240) by [@&#8203;ofek](https://github.com/ofek). ### [`v0.83.0`](https://github.com/tiangolo/fastapi/releases/tag/0.83.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.82.0...0.83.0) 🚨 This is probably the last release (or one of the last releases) to support Python 3.6. 🔥 Python 3.6 reached the [end-of-life and is no longer supported by Python](https://www.python.org/downloads/release/python-3615/) since around a year ago. You hopefully updated to a supported version of Python a while ago. If you haven't, you really should. ##### Features - ✨ Add support in `jsonable_encoder` for include and exclude with dataclasses. PR [#&#8203;4923](https://github.com/tiangolo/fastapi/pull/4923) by [@&#8203;DCsunset](https://github.com/DCsunset). ##### Fixes - 🐛 Fix `RuntimeError` raised when `HTTPException` has a status code with no content. PR [#&#8203;5365](https://github.com/tiangolo/fastapi/pull/5365) by [@&#8203;iudeen](https://github.com/iudeen). - 🐛 Fix empty reponse body when default `status_code` is empty but the a `Response` parameter with `response.status_code` is set. PR [#&#8203;5360](https://github.com/tiangolo/fastapi/pull/5360) by [@&#8203;tmeckel](https://github.com/tmeckel). ##### Docs - 📝 Update `SECURITY.md`. PR [#&#8203;5377](https://github.com/tiangolo/fastapi/pull/5377) by [@&#8203;Kludex](https://github.com/Kludex). ##### Internal - ⬆ \[pre-commit.ci] pre-commit autoupdate. PR [#&#8203;5352](https://github.com/tiangolo/fastapi/pull/5352) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci). ### [`v0.82.0`](https://github.com/tiangolo/fastapi/releases/tag/0.82.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.81.0...0.82.0) 🚨 This is probably the last release (or one of the last releases) to support Python 3.6. 🔥 Python 3.6 reached the [end-of-life and is no longer supported by Python](https://www.python.org/downloads/release/python-3615/) since around a year ago. You hopefully updated to a supported version of Python a while ago. If you haven't, you really should. ##### Features - ✨ Export `WebSocketState` in `fastapi.websockets`. PR [#&#8203;4376](https://github.com/tiangolo/fastapi/pull/4376) by [@&#8203;matiuszka](https://github.com/matiuszka). - ✨ Support Python internal description on Pydantic model's docstring. PR [#&#8203;3032](https://github.com/tiangolo/fastapi/pull/3032) by [@&#8203;Kludex](https://github.com/Kludex). - ✨ Update `ORJSONResponse` to support non `str` keys and serializing Numpy arrays. PR [#&#8203;3892](https://github.com/tiangolo/fastapi/pull/3892) by [@&#8203;baby5](https://github.com/baby5). ##### Fixes - 🐛 Allow exit code for dependencies with `yield` to always execute, by removing capacity limiter for them, to e.g. allow closing DB connections without deadlocks. PR [#&#8203;5122](https://github.com/tiangolo/fastapi/pull/5122) by [@&#8203;adriangb](https://github.com/adriangb). - 🐛 Fix FastAPI People GitHub Action: set HTTPX timeout for GraphQL query request. PR [#&#8203;5222](https://github.com/tiangolo/fastapi/pull/5222) by [@&#8203;iudeen](https://github.com/iudeen). - 🐛 Make sure a parameter defined as required is kept required in OpenAPI even if defined as optional in another dependency. PR [#&#8203;4319](https://github.com/tiangolo/fastapi/pull/4319) by [@&#8203;cd17822](https://github.com/cd17822). - 🐛 Fix support for path parameters in WebSockets. PR [#&#8203;3879](https://github.com/tiangolo/fastapi/pull/3879) by [@&#8203;davidbrochart](https://github.com/davidbrochart). ##### Docs - ✏ Update Hypercorn link, now pointing to GitHub. PR [#&#8203;5346](https://github.com/tiangolo/fastapi/pull/5346) by [@&#8203;baconfield](https://github.com/baconfield). - ✏ Tweak wording in `docs/en/docs/advanced/dataclasses.md`. PR [#&#8203;3698](https://github.com/tiangolo/fastapi/pull/3698) by [@&#8203;pfackeldey](https://github.com/pfackeldey). - 📝 Add note about Python 3.10 `X | Y` operator in explanation about Response Models. PR [#&#8203;5307](https://github.com/tiangolo/fastapi/pull/5307) by [@&#8203;MendyLanda](https://github.com/MendyLanda). - 📝 Add link to New Relic article: "How to monitor FastAPI application performance using Python agent". PR [#&#8203;5260](https://github.com/tiangolo/fastapi/pull/5260) by [@&#8203;sjyothi54](https://github.com/sjyothi54). - 📝 Update docs for `ORJSONResponse` with details about improving performance. PR [#&#8203;2615](https://github.com/tiangolo/fastapi/pull/2615) by [@&#8203;falkben](https://github.com/falkben). - 📝 Add docs for creating a custom Response class. PR [#&#8203;5331](https://github.com/tiangolo/fastapi/pull/5331) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Add tip about using alias for form data fields. PR [#&#8203;5329](https://github.com/tiangolo/fastapi/pull/5329) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Translations - 🌐 Add Russian translation for `docs/ru/docs/features.md`. PR [#&#8203;5315](https://github.com/tiangolo/fastapi/pull/5315) by [@&#8203;Xewus](https://github.com/Xewus). - 🌐 Update Chinese translation for `docs/zh/docs/tutorial/request-files.md`. PR [#&#8203;4529](https://github.com/tiangolo/fastapi/pull/4529) by [@&#8203;ASpathfinder](https://github.com/ASpathfinder). - 🌐 Add Chinese translation for `docs/zh/docs/tutorial/encoder.md`. PR [#&#8203;4969](https://github.com/tiangolo/fastapi/pull/4969) by [@&#8203;Zssaer](https://github.com/Zssaer). - 🌐 Fix MkDocs file line for Portuguese translation of `background-task.md`. PR [#&#8203;5242](https://github.com/tiangolo/fastapi/pull/5242) by [@&#8203;ComicShrimp](https://github.com/ComicShrimp). ##### Internal - 👥 Update FastAPI People. PR [#&#8203;5347](https://github.com/tiangolo/fastapi/pull/5347) by [@&#8203;github-actions\[bot\]](https://github.com/apps/github-actions). - ⬆ Bump dawidd6/action-download-artifact from 2.22.0 to 2.23.0. PR [#&#8203;5321](https://github.com/tiangolo/fastapi/pull/5321) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ \[pre-commit.ci] pre-commit autoupdate. PR [#&#8203;5318](https://github.com/tiangolo/fastapi/pull/5318) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci). - ✏ Fix a small code highlight line error. PR [#&#8203;5256](https://github.com/tiangolo/fastapi/pull/5256) by [@&#8203;hjlarry](https://github.com/hjlarry). - ♻ Internal small refactor, move `operation_id` parameter position in delete method for consistency with the code. PR [#&#8203;4474](https://github.com/tiangolo/fastapi/pull/4474) by [@&#8203;hiel](https://github.com/hiel). - 🔧 Update sponsors, disable ImgWhale. PR [#&#8203;5338](https://github.com/tiangolo/fastapi/pull/5338) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.81.0`](https://github.com/tiangolo/fastapi/releases/tag/0.81.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.80.0...0.81.0) ##### Features - ✨ Add ReDoc `<noscript>` warning when JS is disabled. PR [#&#8203;5074](https://github.com/tiangolo/fastapi/pull/5074) by [@&#8203;evroon](https://github.com/evroon). - ✨ Add support for `FrozenSet` in parameters (e.g. query). PR [#&#8203;2938](https://github.com/tiangolo/fastapi/pull/2938) by [@&#8203;juntatalor](https://github.com/juntatalor). - ✨ Allow custom middlewares to raise `HTTPException`s and propagate them. PR [#&#8203;2036](https://github.com/tiangolo/fastapi/pull/2036) by [@&#8203;ghandic](https://github.com/ghandic). - ✨ Preserve `json.JSONDecodeError` information when handling invalid JSON in request body, to support custom exception handlers that use its information. PR [#&#8203;4057](https://github.com/tiangolo/fastapi/pull/4057) by [@&#8203;UKnowWhoIm](https://github.com/UKnowWhoIm). ##### Fixes - 🐛 Fix `jsonable_encoder` for dataclasses with pydantic-compatible fields. PR [#&#8203;3607](https://github.com/tiangolo/fastapi/pull/3607) by [@&#8203;himbeles](https://github.com/himbeles). - 🐛 Fix support for extending `openapi_extras` with parameter lists. PR [#&#8203;4267](https://github.com/tiangolo/fastapi/pull/4267) by [@&#8203;orilevari](https://github.com/orilevari). ##### Docs - ✏ Fix a simple typo in `docs/en/docs/python-types.md`. PR [#&#8203;5193](https://github.com/tiangolo/fastapi/pull/5193) by [@&#8203;GlitchingCore](https://github.com/GlitchingCore). - ✏ Fix typos in `tests/test_schema_extra_examples.py`. PR [#&#8203;5126](https://github.com/tiangolo/fastapi/pull/5126) by [@&#8203;supraaxdd](https://github.com/supraaxdd). - ✏ Fix typos in `docs/en/docs/tutorial/path-params-numeric-validations.md`. PR [#&#8203;5142](https://github.com/tiangolo/fastapi/pull/5142) by [@&#8203;invisibleroads](https://github.com/invisibleroads). - 📝 Add step about upgrading pip in the venv to avoid errors when installing dependencies `docs/en/docs/contributing.md`. PR [#&#8203;5181](https://github.com/tiangolo/fastapi/pull/5181) by [@&#8203;edisnake](https://github.com/edisnake). - ✏ Reword and clarify text in tutorial `docs/en/docs/tutorial/body-nested-models.md`. PR [#&#8203;5169](https://github.com/tiangolo/fastapi/pull/5169) by [@&#8203;papb](https://github.com/papb). - ✏ Fix minor typo in `docs/en/docs/features.md`. PR [#&#8203;5206](https://github.com/tiangolo/fastapi/pull/5206) by [@&#8203;OtherBarry](https://github.com/OtherBarry). - ✏ Fix minor typos in `docs/en/docs/async.md`. PR [#&#8203;5125](https://github.com/tiangolo/fastapi/pull/5125) by [@&#8203;Ksenofanex](https://github.com/Ksenofanex). - 📝 Add external link to docs: "Fastapi, Docker(Docker compose) and Postgres". PR [#&#8203;5033](https://github.com/tiangolo/fastapi/pull/5033) by [@&#8203;krishnardt](https://github.com/krishnardt). - 📝 Simplify example for docs for Additional Responses, remove unnecessary `else`. PR [#&#8203;4693](https://github.com/tiangolo/fastapi/pull/4693) by [@&#8203;adriangb](https://github.com/adriangb). - 📝 Update docs, compare enums with identity instead of equality. PR [#&#8203;4905](https://github.com/tiangolo/fastapi/pull/4905) by [@&#8203;MicaelJarniac](https://github.com/MicaelJarniac). - ✏ Fix typo in `docs/en/docs/python-types.md`. PR [#&#8203;4886](https://github.com/tiangolo/fastapi/pull/4886) by [@&#8203;MicaelJarniac](https://github.com/MicaelJarniac). - 🎨 Fix syntax highlighting in docs for OpenAPI Callbacks. PR [#&#8203;4368](https://github.com/tiangolo/fastapi/pull/4368) by [@&#8203;xncbf](https://github.com/xncbf). - ✏ Reword confusing sentence in docs file `typo-fix-path-params-numeric-validations.md`. PR [#&#8203;3219](https://github.com/tiangolo/fastapi/pull/3219) by [@&#8203;ccrenfroe](https://github.com/ccrenfroe). - 📝 Update docs for handling HTTP Basic Auth with `secrets.compare_digest()` to account for non-ASCII characters. PR [#&#8203;3536](https://github.com/tiangolo/fastapi/pull/3536) by [@&#8203;lewoudar](https://github.com/lewoudar). - 📝 Update docs for testing, fix examples with relative imports. PR [#&#8203;5302](https://github.com/tiangolo/fastapi/pull/5302) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Translations - 🌐 Add Russian translation for `docs/ru/docs/index.md`. PR [#&#8203;5289](https://github.com/tiangolo/fastapi/pull/5289) by [@&#8203;impocode](https://github.com/impocode). - 🌐 Add Russian translation for `docs/ru/docs/deployment/versions.md`. PR [#&#8203;4985](https://github.com/tiangolo/fastapi/pull/4985) by [@&#8203;emp7yhead](https://github.com/emp7yhead). - 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/header-params.md`. PR [#&#8203;4921](https://github.com/tiangolo/fastapi/pull/4921) by [@&#8203;batlopes](https://github.com/batlopes). - 🌐 Update `ko/mkdocs.yml` for a missing link. PR [#&#8203;5020](https://github.com/tiangolo/fastapi/pull/5020) by [@&#8203;dalinaum](https://github.com/dalinaum). ##### Internal - ⬆ Bump dawidd6/action-download-artifact from 2.21.1 to 2.22.0. PR [#&#8203;5258](https://github.com/tiangolo/fastapi/pull/5258) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ \[pre-commit.ci] pre-commit autoupdate. PR [#&#8203;5196](https://github.com/tiangolo/fastapi/pull/5196) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci). - 🔥 Delete duplicated tests in `tests/test_tutorial/test_sql_databases/test_sql_databases.py`. PR [#&#8203;5040](https://github.com/tiangolo/fastapi/pull/5040) by [@&#8203;raccoonyy](https://github.com/raccoonyy). - ♻ Simplify internal RegEx in `fastapi/utils.py`. PR [#&#8203;5057](https://github.com/tiangolo/fastapi/pull/5057) by [@&#8203;pylounge](https://github.com/pylounge). - 🔧 Fix Type hint of `auto_error` which does not need to be `Optional[bool]`. PR [#&#8203;4933](https://github.com/tiangolo/fastapi/pull/4933) by [@&#8203;DavidKimDY](https://github.com/DavidKimDY). - 🔧 Update mypy config, use `strict = true` instead of manual configs. PR [#&#8203;4605](https://github.com/tiangolo/fastapi/pull/4605) by [@&#8203;michaeloliverx](https://github.com/michaeloliverx). - ♻ Change a `dict()` for `{}` in `fastapi/utils.py`. PR [#&#8203;3138](https://github.com/tiangolo/fastapi/pull/3138) by [@&#8203;ShahriyarR](https://github.com/ShahriyarR). - ♻ Move internal variable for errors in `jsonable_encoder` to put related code closer. PR [#&#8203;4560](https://github.com/tiangolo/fastapi/pull/4560) by [@&#8203;GuilleQP](https://github.com/GuilleQP). - ♻ Simplify conditional assignment in `fastapi/dependencies/utils.py`. PR [#&#8203;4597](https://github.com/tiangolo/fastapi/pull/4597) by [@&#8203;cikay](https://github.com/cikay). - ⬆ Upgrade version pin accepted for Flake8, for internal code, to `flake8 >=3.8.3,<6.0.0`. PR [#&#8203;4097](https://github.com/tiangolo/fastapi/pull/4097) by [@&#8203;jamescurtin](https://github.com/jamescurtin). - 🍱 Update Jina banner, fix typo. PR [#&#8203;5301](https://github.com/tiangolo/fastapi/pull/5301) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.80.0`](https://github.com/tiangolo/fastapi/releases/tag/0.80.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.79.1...0.80.0) ##### Breaking Changes - Fixes - 🐛 Fix `response_model` not invalidating `None`. PR [#&#8203;2725](https://github.com/tiangolo/fastapi/pull/2725) by [@&#8203;hukkin](https://github.com/hukkin). If you are using `response_model` with some type that doesn't include `None` but the function is returning `None`, it will now raise an internal server error, because you are returning invalid data that violates the contract in `response_model`. Before this release it would allow breaking that contract returning `None`. For example, if you have an app like this: ```Python from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str price: Optional[float] = None owner_ids: Optional[List[int]] = None app = FastAPI() @&#8203;app.get("/items/invalidnone", response_model=Item) def get_invalid_none(): return None ``` ...calling the path `/items/invalidnone` will raise an error, because `None` is not a valid type for the `response_model` declared with `Item`. You could also be implicitly returning `None` without realizing, for example: ```Python from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str price: Optional[float] = None owner_ids: Optional[List[int]] = None app = FastAPI() @&#8203;app.get("/items/invalidnone", response_model=Item) def get_invalid_none(): if flag: return {"name": "foo"} ### if flag is False, at this point the function will implicitly return None ``` If you have *path operations* using `response_model` that need to be allowed to return `None`, make it explicit in `response_model` using `Union[Something, None]`: ```Python from typing import Union from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str price: Optional[float] = None owner_ids: Optional[List[int]] = None app = FastAPI() @&#8203;app.get("/items/invalidnone", response_model=Union[Item, None]) def get_invalid_none(): return None ``` This way the data will be correctly validated, you won't have an internal server error, and the documentation will also reflect that this *path operation* could return `None` (or `null` in JSON). ##### Fixes - ⬆ Upgrade Swagger UI copy of `oauth2-redirect.html` to include fixes for flavors of authorization code flows in Swagger UI. PR [#&#8203;3439](https://github.com/tiangolo/fastapi/pull/3439) initial PR by [@&#8203;koonpeng](https://github.com/koonpeng). - ♻ Strip empty whitespace from description extracted from docstrings. PR [#&#8203;2821](https://github.com/tiangolo/fastapi/pull/2821) by [@&#8203;and-semakin](https://github.com/and-semakin). - 🐛 Fix cached dependencies when using a dependency in `Security()` and other places (e.g. `Depends()`) with different OAuth2 scopes. PR [#&#8203;2945](https://github.com/tiangolo/fastapi/pull/2945) by [@&#8203;laggardkernel](https://github.com/laggardkernel). - 🎨 Update type annotations for `response_model`, allow things like `Union[str, None]`. PR [#&#8203;5294](https://github.com/tiangolo/fastapi/pull/5294) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Translations - 🌐 Fix typos in German translation for `docs/de/docs/features.md`. PR [#&#8203;4533](https://github.com/tiangolo/fastapi/pull/4533) by [@&#8203;0xflotus](https://github.com/0xflotus). - 🌐 Add missing navigator for `encoder.md` in Korean translation. PR [#&#8203;5238](https://github.com/tiangolo/fastapi/pull/5238) by [@&#8203;joonas-yoon](https://github.com/joonas-yoon). - (Empty PR merge by accident) [#&#8203;4913](https://github.com/tiangolo/fastapi/pull/4913). ### [`v0.79.1`](https://github.com/tiangolo/fastapi/releases/tag/0.79.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.79.0...0.79.1) ##### Fixes - 🐛 Fix `jsonable_encoder` using `include` and `exclude` parameters for non-Pydantic objects. PR [#&#8203;2606](https://github.com/tiangolo/fastapi/pull/2606) by [@&#8203;xaviml](https://github.com/xaviml). - 🐛 Fix edge case with repeated aliases names not shown in OpenAPI. PR [#&#8203;2351](https://github.com/tiangolo/fastapi/pull/2351) by [@&#8203;klaa97](https://github.com/klaa97). - 📝 Add misc dependency installs to tutorial docs. PR [#&#8203;2126](https://github.com/tiangolo/fastapi/pull/2126) by [@&#8203;TeoZosa](https://github.com/TeoZosa). ##### Docs - 📝 Add note giving credit for illustrations to [Ketrina Thompson](https://www.instagram.com/ketrinadrawsalot/). PR [#&#8203;5284](https://github.com/tiangolo/fastapi/pull/5284) by [@&#8203;tiangolo](https://github.com/tiangolo). - ✏ Fix typo in `python-types.md`. PR [#&#8203;5116](https://github.com/tiangolo/fastapi/pull/5116) by [@&#8203;Kludex](https://github.com/Kludex). - ✏ Fix typo in `docs/en/docs/python-types.md`. PR [#&#8203;5007](https://github.com/tiangolo/fastapi/pull/5007) by [@&#8203;atiabbz](https://github.com/atiabbz). - 📝 Remove unneeded Django/Flask references from async topic intro. PR [#&#8203;5280](https://github.com/tiangolo/fastapi/pull/5280) by [@&#8203;carltongibson](https://github.com/carltongibson). - ✨ Add illustrations for Concurrent burgers and Parallel burgers. PR [#&#8203;5277](https://github.com/tiangolo/fastapi/pull/5277) by [@&#8203;tiangolo](https://github.com/tiangolo). Updated docs at: [Concurrency and Burgers](https://fastapi.tiangolo.com/async/#concurrency-and-burgers). ##### Translations - 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/query-params.md`. PR [#&#8203;4775](https://github.com/tiangolo/fastapi/pull/4775) by [@&#8203;batlopes](https://github.com/batlopes). - 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/security/first-steps.md`. PR [#&#8203;4954](https://github.com/tiangolo/fastapi/pull/4954) by [@&#8203;FLAIR7](https://github.com/FLAIR7). - 🌐 Add translation for `docs/zh/docs/advanced/response-cookies.md`. PR [#&#8203;4638](https://github.com/tiangolo/fastapi/pull/4638) by [@&#8203;zhangbo2012](https://github.com/zhangbo2012). - 🌐 Add French translation for `docs/fr/docs/deployment/index.md`. PR [#&#8203;3689](https://github.com/tiangolo/fastapi/pull/3689) by [@&#8203;rjNemo](https://github.com/rjNemo). - 🌐 Add Portuguese translation for `tutorial/handling-errors.md`. PR [#&#8203;4769](https://github.com/tiangolo/fastapi/pull/4769) by [@&#8203;frnsimoes](https://github.com/frnsimoes). - 🌐 Add French translation for `docs/fr/docs/history-design-future.md`. PR [#&#8203;3451](https://github.com/tiangolo/fastapi/pull/3451) by [@&#8203;rjNemo](https://github.com/rjNemo). - 🌐 Add Russian translation for `docs/ru/docs/tutorial/background-tasks.md`. PR [#&#8203;4854](https://github.com/tiangolo/fastapi/pull/4854) by [@&#8203;AdmiralDesu](https://github.com/AdmiralDesu). - 🌐 Add Chinese translation for `docs/tutorial/security/first-steps.md`. PR [#&#8203;3841](https://github.com/tiangolo/fastapi/pull/3841) by [@&#8203;jaystone776](https://github.com/jaystone776). - 🌐 Add Japanese translation for `docs/ja/docs/advanced/nosql-databases.md`. PR [#&#8203;4205](https://github.com/tiangolo/fastapi/pull/4205) by [@&#8203;sUeharaE4](https://github.com/sUeharaE4). - 🌐 Add Indonesian translation for `docs/id/docs/tutorial/index.md`. PR [#&#8203;4705](https://github.com/tiangolo/fastapi/pull/4705) by [@&#8203;bas-baskara](https://github.com/bas-baskara). - 🌐 Add Persian translation for `docs/fa/docs/index.md` and tweak right-to-left CSS. PR [#&#8203;2395](https://github.com/tiangolo/fastapi/pull/2395) by [@&#8203;mohsen-mahmoodi](https://github.com/mohsen-mahmoodi). ##### Internal - 🔧 Update Jina sponsorship. PR [#&#8203;5283](https://github.com/tiangolo/fastapi/pull/5283) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update Jina sponsorship. PR [#&#8203;5272](https://github.com/tiangolo/fastapi/pull/5272) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors, Striveworks badge. PR [#&#8203;5179](https://github.com/tiangolo/fastapi/pull/5179) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.79.0`](https://github.com/tiangolo/fastapi/releases/tag/0.79.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.78.0...0.79.0) ##### Fixes - Breaking Changes - 🐛 Fix removing body from status codes that do not support it. PR [#&#8203;5145](https://github.com/tiangolo/fastapi/pull/5145) by [@&#8203;tiangolo](https://github.com/tiangolo). - Setting `status_code` to `204`, `304`, or any code below `200` (1xx) will remove the body from the response. - This fixes an error in Uvicorn that otherwise would be thrown: `RuntimeError: Response content longer than Content-Length`. - This removes `fastapi.openapi.constants.STATUS_CODES_WITH_NO_BODY`, it is replaced by a function in utils. ##### Translations - 🌐 Start of Hebrew translation. PR [#&#8203;5050](https://github.com/tiangolo/fastapi/pull/5050) by [@&#8203;itay-raveh](https://github.com/itay-raveh). - 🔧 Add config for Swedish translations notification. PR [#&#8203;5147](https://github.com/tiangolo/fastapi/pull/5147) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🌐 Start of Swedish translation. PR [#&#8203;5062](https://github.com/tiangolo/fastapi/pull/5062) by [@&#8203;MrRawbin](https://github.com/MrRawbin). - 🌐 Add Japanese translation for `docs/ja/docs/advanced/index.md`. PR [#&#8203;5043](https://github.com/tiangolo/fastapi/pull/5043) by [@&#8203;wakabame](https://github.com/wakabame). - 🌐🇵🇱 Add Polish translation for `docs/pl/docs/tutorial/first-steps.md`. PR [#&#8203;5024](https://github.com/tiangolo/fastapi/pull/5024) by [@&#8203;Valaraucoo](https://github.com/Valaraucoo). ##### Internal - 🔧 Update translations notification for Hebrew. PR [#&#8203;5158](https://github.com/tiangolo/fastapi/pull/5158) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update Dependabot commit message. PR [#&#8203;5156](https://github.com/tiangolo/fastapi/pull/5156) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ Bump actions/upload-artifact from 2 to 3. PR [#&#8203;5148](https://github.com/tiangolo/fastapi/pull/5148) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump actions/cache from 2 to 3. PR [#&#8203;5149](https://github.com/tiangolo/fastapi/pull/5149) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 🔧 Update sponsors badge configs. PR [#&#8203;5155](https://github.com/tiangolo/fastapi/pull/5155) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👥 Update FastAPI People. PR [#&#8203;5154](https://github.com/tiangolo/fastapi/pull/5154) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update Jina sponsor badges. PR [#&#8203;5151](https://github.com/tiangolo/fastapi/pull/5151) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ Bump actions/checkout from 2 to 3. PR [#&#8203;5133](https://github.com/tiangolo/fastapi/pull/5133) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ \[pre-commit.ci] pre-commit autoupdate. PR [#&#8203;5030](https://github.com/tiangolo/fastapi/pull/5030) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci). - ⬆ Bump nwtgck/actions-netlify from 1.1.5 to 1.2.3. PR [#&#8203;5132](https://github.com/tiangolo/fastapi/pull/5132) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump codecov/codecov-action from 2 to 3. PR [#&#8203;5131](https://github.com/tiangolo/fastapi/pull/5131) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump dawidd6/action-download-artifact from 2.9.0 to 2.21.1. PR [#&#8203;5130](https://github.com/tiangolo/fastapi/pull/5130) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump actions/setup-python from 2 to 4. PR [#&#8203;5129](https://github.com/tiangolo/fastapi/pull/5129) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 👷 Add Dependabot. PR [#&#8203;5128](https://github.com/tiangolo/fastapi/pull/5128) by [@&#8203;tiangolo](https://github.com/tiangolo). - ♻️ Move from `Optional[X]` to `Union[X, None]` for internal utils. PR [#&#8203;5124](https://github.com/tiangolo/fastapi/pull/5124) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors, remove Dropbase, add Doist. PR [#&#8203;5096](https://github.com/tiangolo/fastapi/pull/5096) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors, remove Classiq, add ImgWhale. PR [#&#8203;5079](https://github.com/tiangolo/fastapi/pull/5079) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.78.0`](https://github.com/tiangolo/fastapi/releases/tag/0.78.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.77.1...0.78.0) ##### Features - ✨ Add support for omitting `...` as default value when declaring required parameters with: - `Path()` - `Query()` - `Header()` - `Cookie()` - `Body()` - `Form()` - `File()` New docs at [Tutorial - Query Parameters and String Validations - Make it required](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#make-it-required). PR [#&#8203;4906](https://github.com/tiangolo/fastapi/pull/4906) by [@&#8203;tiangolo](https://github.com/tiangolo). Up to now, declaring a required parameter while adding additional validation or metadata needed using `...` (Ellipsis). For example: ```Python from fastapi import Cookie, FastAPI, Header, Path, Query app = FastAPI() @&#8203;app.get("/items/{item_id}") def main( item_id: int = Path(default=..., gt=0), query: str = Query(default=..., max_length=10), session: str = Cookie(default=..., min_length=3), x_trace: str = Header(default=..., title="Tracing header"), ): return {"message": "Hello World"} ``` ...all these parameters are required because the default value is `...` (Ellipsis). But now it's possible and supported to just omit the default value, as would be done with Pydantic fields, and the parameters would still be required. ✨ For example, this is now supported: ```Python from fastapi import Cookie, FastAPI, Header, Path, Query app = FastAPI() @&#8203;app.get("/items/{item_id}") def main( item_id: int = Path(gt=0), query: str = Query(max_length=10), session: str = Cookie(min_length=3), x_trace: str = Header(title="Tracing header"), ): return {"message": "Hello World"} ``` To declare parameters as optional (not required), you can set a default value as always, for example using `None`: ```Python from typing import Union from fastapi import Cookie, FastAPI, Header, Path, Query app = FastAPI() @&#8203;app.get("/items/{item_id}") def main( item_id: int = Path(gt=0), query: Union[str, None] = Query(default=None, max_length=10), session: Union[str, None] = Cookie(default=None, min_length=3), x_trace: Union[str, None] = Header(default=None, title="Tracing header"), ): return {"message": "Hello World"} ``` ##### Docs - 📝 Add docs recommending `Union` over `Optional` and migrate source examples. New docs at [Python Types Intro - Using `Union` or `Optional`](https://fastapi.tiangolo.com/python-types/#using-union-or-optional). PR [#&#8203;4908](https://github.com/tiangolo/fastapi/pull/4908) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🎨 Fix default value as set in tutorial for Path Operations Advanced Configurations. PR [#&#8203;4899](https://github.com/tiangolo/fastapi/pull/4899) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Add documentation for redefined path operations. PR [#&#8203;4864](https://github.com/tiangolo/fastapi/pull/4864) by [@&#8203;madkinsz](https://github.com/madkinsz). - 📝 Updates links for Celery documentation. PR [#&#8203;4736](https://github.com/tiangolo/fastapi/pull/4736) by [@&#8203;sammyzord](https://github.com/sammyzord). - ✏ Fix example code with sets in tutorial for body nested models. PR [#&#8203;3030](https://github.com/tiangolo/fastapi/pull/3030) by [@&#8203;hitrust](https://github.com/hitrust). - ✏ Fix links to Pydantic docs. PR [#&#8203;4670](https://github.com/tiangolo/fastapi/pull/4670) by [@&#8203;kinuax](https://github.com/kinuax). - 📝 Update docs about Swagger UI self-hosting with newer source links. PR [#&#8203;4813](https://github.com/tiangolo/fastapi/pull/4813) by [@&#8203;Kastakin](https://github.com/Kastakin). - 📝 Add link to external article: Building the Poll App From Django Tutorial With FastAPI And React. PR [#&#8203;4778](https://github.com/tiangolo/fastapi/pull/4778) by [@&#8203;jbrocher](https://github.com/jbrocher). - 📝 Add OpenAPI warning to "Body - Fields" docs with extra schema extensions. PR [#&#8203;4846](https://github.com/tiangolo/fastapi/pull/4846) by [@&#8203;ml-evs](https://github.com/ml-evs). ##### Translations - 🌐 Fix code examples in Japanese translation for `docs/ja/docs/tutorial/testing.md`. PR [#&#8203;4623](https://github.com/tiangolo/fastapi/pull/4623) by [@&#8203;hirotoKirimaru](https://github.com/hirotoKirimaru). ##### Internal - ♻ Refactor dict value extraction to minimize key lookups `fastapi/utils.py`. PR [#&#8203;3139](https://github.com/tiangolo/fastapi/pull/3139) by [@&#8203;ShahriyarR](https://github.com/ShahriyarR). - ✅ Add tests for required nonable parameters and body fields. PR [#&#8203;4907](https://github.com/tiangolo/fastapi/pull/4907) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Fix installing Material for MkDocs Insiders in CI. PR [#&#8203;4897](https://github.com/tiangolo/fastapi/pull/4897) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Add pre-commit CI instead of custom GitHub Action. PR [#&#8203;4896](https://github.com/tiangolo/fastapi/pull/4896) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Add pre-commit GitHub Action workflow. PR [#&#8203;4895](https://github.com/tiangolo/fastapi/pull/4895) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Add dark mode auto switch to docs based on OS preference. PR [#&#8203;4869](https://github.com/tiangolo/fastapi/pull/4869) by [@&#8203;ComicShrimp](https://github.com/ComicShrimp). - 🔥 Remove un-used old pending tests, already covered in other places. PR [#&#8203;4891](https://github.com/tiangolo/fastapi/pull/4891) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Add Python formatting hooks to pre-commit. PR [#&#8203;4890](https://github.com/tiangolo/fastapi/pull/4890) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Add pre-commit with first config and first formatting pass. PR [#&#8203;4888](https://github.com/tiangolo/fastapi/pull/4888) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Disable CI installing Material for MkDocs in forks. PR [#&#8203;4410](https://github.com/tiangolo/fastapi/pull/4410) by [@&#8203;dolfinus](https://github.com/dolfinus). ### [`v0.77.1`](https://github.com/tiangolo/fastapi/releases/tag/0.77.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.77.0...0.77.1) ##### Upgrades - ⬆ Upgrade Starlette from 0.19.0 to 0.19.1. PR [#&#8203;4819](https://github.com/tiangolo/fastapi/pull/4819) by [@&#8203;Kludex](https://github.com/Kludex). ##### Docs - 📝 Add link to german article: REST-API Programmieren mittels Python und dem FastAPI Modul. PR [#&#8203;4624](https://github.com/tiangolo/fastapi/pull/4624) by [@&#8203;fschuermeyer](https://github.com/fschuermeyer). - 📝 Add external link: PyCharm Guide to FastAPI. PR [#&#8203;4512](https://github.com/tiangolo/fastapi/pull/4512) by [@&#8203;mukulmantosh](https://github.com/mukulmantosh). - 📝 Add external link to article: Building an API with FastAPI and Supabase and Deploying on Deta. PR [#&#8203;4440](https://github.com/tiangolo/fastapi/pull/4440) by [@&#8203;aUnicornDev](https://github.com/aUnicornDev). - ✏ Fix small typo in `docs/en/docs/tutorial/security/first-steps.md`. PR [#&#8203;4515](https://github.com/tiangolo/fastapi/pull/4515) by [@&#8203;KikoIlievski](https://github.com/KikoIlievski). ##### Translations - 🌐 Add Polish translation for `docs/pl/docs/tutorial/index.md`. PR [#&#8203;4516](https://github.com/tiangolo/fastapi/pull/4516) by [@&#8203;MKaczkow](https://github.com/MKaczkow). - ✏ Fix typo in deployment. PR [#&#8203;4629](https://github.com/tiangolo/fastapi/pull/4629) by [@&#8203;raisulislam541](https://github.com/raisulislam541). - 🌐 Add Portuguese translation for `docs/pt/docs/help-fastapi.md`. PR [#&#8203;4583](https://github.com/tiangolo/fastapi/pull/4583) by [@&#8203;mateusjs](https://github.com/mateusjs). ##### Internal - 🔧 Add notifications in issue for Uzbek translations. PR [#&#8203;4884](https://github.com/tiangolo/fastapi/pull/4884) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.77.0`](https://github.com/tiangolo/fastapi/releases/tag/0.77.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.76.0...0.77.0) ##### Upgrades - ⬆ Upgrade Starlette from 0.18.0 to 0.19.0. PR [#&#8203;4488](https://github.com/tiangolo/fastapi/pull/4488) by [@&#8203;Kludex](https://github.com/Kludex). - When creating an explicit `JSONResponse` the `content` argument is now required. ##### Docs - 📝 Add external link to article: Seamless FastAPI Configuration with ConfZ. PR [#&#8203;4414](https://github.com/tiangolo/fastapi/pull/4414) by [@&#8203;silvanmelchior](https://github.com/silvanmelchior). - 📝 Add external link to article: 5 Advanced Features of FastAPI You Should Try. PR [#&#8203;4436](https://github.com/tiangolo/fastapi/pull/4436) by [@&#8203;kaustubhgupta](https://github.com/kaustubhgupta). - ✏ Reword to improve legibility of docs about `TestClient`. PR [#&#8203;4389](https://github.com/tiangolo/fastapi/pull/4389) by [@&#8203;rgilton](https://github.com/rgilton). - 📝 Add external link to blog post about Kafka, FastAPI, and Ably. PR [#&#8203;4044](https://github.com/tiangolo/fastapi/pull/4044) by [@&#8203;Ugbot](https://github.com/Ugbot). - ✏ Fix typo in `docs/en/docs/tutorial/sql-databases.md`. PR [#&#8203;4875](https://github.com/tiangolo/fastapi/pull/4875) by [@&#8203;wpyoga](https://github.com/wpyoga). - ✏ Fix typo in `docs/en/docs/async.md`. PR [#&#8203;4726](https://github.com/tiangolo/fastapi/pull/4726) by [@&#8203;Prezu](https://github.com/Prezu). ##### Translations - 🌐 Update source example highlights for `docs/zh/docs/tutorial/query-params-str-validations.md`. PR [#&#8203;4237](https://github.com/tiangolo/fastapi/pull/4237) by [@&#8203;caimaoy](https://github.com/caimaoy). - 🌐 Remove translation docs references to aiofiles as it's no longer needed since AnyIO. PR [#&#8203;3594](https://github.com/tiangolo/fastapi/pull/3594) by [@&#8203;alonme](https://github.com/alonme). - ✏ 🌐 Fix typo in Portuguese translation for `docs/pt/docs/tutorial/path-params.md`. PR [#&#8203;4722](https://github.com/tiangolo/fastapi/pull/4722) by [@&#8203;CleoMenezesJr](https://github.com/CleoMenezesJr). - 🌐 Fix live docs server for translations for some languages. PR [#&#8203;4729](https://github.com/tiangolo/fastapi/pull/4729) by [@&#8203;wakabame](https://github.com/wakabame). - 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/cookie-params.md`. PR [#&#8203;4112](https://github.com/tiangolo/fastapi/pull/4112) by [@&#8203;lbmendes](https://github.com/lbmendes). - 🌐 Fix French translation for `docs/tutorial/body.md`. PR [#&#8203;4332](https://github.com/tiangolo/fastapi/pull/4332) by [@&#8203;Smlep](https://github.com/Smlep). - 🌐 Add Japanese translation for `docs/ja/docs/advanced/conditional-openapi.md`. PR [#&#8203;2631](https://github.com/tiangolo/fastapi/pull/2631) by [@&#8203;sh0nk](https://github.com/sh0nk). - 🌐 Fix Japanese translation of `docs/ja/docs/tutorial/body.md`. PR [#&#8203;3062](https://github.com/tiangolo/fastapi/pull/3062) by [@&#8203;a-takahashi223](https://github.com/a-takahashi223). - 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/background-tasks.md`. PR [#&#8203;2170](https://github.com/tiangolo/fastapi/pull/2170) by [@&#8203;izaguerreiro](https://github.com/izaguerreiro). - 🌐 Add Portuguese translation for `docs/deployment/deta.md`. PR [#&#8203;4442](https://github.com/tiangolo/fastapi/pull/4442) by [@&#8203;lsglucas](https://github.com/lsglucas). - 🌐 Add Russian translation for `docs/async.md`. PR [#&#8203;4036](https://github.com/tiangolo/fastapi/pull/4036) by [@&#8203;Winand](https://github.com/Winand). - 🌐 Add Portuguese translation for `docs/tutorial/body.md`. PR [#&#8203;3960](https://github.com/tiangolo/fastapi/pull/3960) by [@&#8203;leandrodesouzadev](https://github.com/leandrodesouzadev). - 🌐 Add Portuguese translation of `tutorial/extra-data-types.md`. PR [#&#8203;4077](https://github.com/tiangolo/fastapi/pull/4077) by [@&#8203;luccasmmg](https://github.com/luccasmmg). - 🌐 Update German translation for `docs/features.md`. PR [#&#8203;3905](https://github.com/tiangolo/fastapi/pull/3905) by [@&#8203;jomue](https://github.com/jomue). ### [`v0.76.0`](https://github.com/tiangolo/fastapi/releases/tag/0.76.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.75.2...0.76.0) ##### Upgrades - ⬆ Upgrade Starlette from 0.17.1 to 0.18.0. PR [#&#8203;4483](https://github.com/tiangolo/fastapi/pull/4483) by [@&#8203;Kludex](https://github.com/Kludex). ##### Internal - 👥 Update FastAPI People. PR [#&#8203;4847](https://github.com/tiangolo/fastapi/pull/4847) by [@&#8203;github-actions\[bot\]](https://github.com/apps/github-actions). - 🔧 Add Budget Insight sponsor. PR [#&#8203;4824](https://github.com/tiangolo/fastapi/pull/4824) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🍱 Update sponsor, ExoFlare badge. PR [#&#8203;4822](https://github.com/tiangolo/fastapi/pull/4822) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors, enable Dropbase again, update TalkPython link. PR [#&#8203;4821](https://github.com/tiangolo/fastapi/pull/4821) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.75.2`](https://github.com/tiangolo/fastapi/releases/tag/0.75.2) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.75.1...0.75.2) This release includes upgrades to third-party packages that handle security issues. Although there's a chance these issues don't affect you in particular, please upgrade as soon as possible. ##### Fixes - ✅ Fix new/recent tests with new fixed `ValidationError` JSON Schema. PR [#&#8203;4806](https://github.com/tiangolo/fastapi/pull/4806) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🐛 Fix JSON Schema for `ValidationError` at field `loc`. PR [#&#8203;3810](https://github.com/tiangolo/fastapi/pull/3810) by [@&#8203;dconathan](https://github.com/dconathan). - 🐛 Fix support for prefix on APIRouter WebSockets. PR [#&#8203;2640](https://github.com/tiangolo/fastapi/pull/2640) by [@&#8203;Kludex](https://github.com/Kludex). ##### Upgrades - ⬆️ Update ujson ranges for CVE-2021-45958. PR [#&#8203;4804](https://github.com/tiangolo/fastapi/pull/4804) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆️ Upgrade dependencies upper range for extras "all". PR [#&#8203;4803](https://github.com/tiangolo/fastapi/pull/4803) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ Upgrade Swagger UI - swagger-ui-dist@4. This handles a security issue in Swagger UI itself where it could be possible to inject HTML into Swagger UI. Please upgrade as soon as you can, in particular if you expose your Swagger UI (`/docs`) publicly to non-expert users. PR [#&#8203;4347](https://github.com/tiangolo/fastapi/pull/4347) by [@&#8203;RAlanWright](https://github.com/RAlanWright). ##### Internal - 🔧 Update sponsors, add: ExoFlare, Ines Course; remove: Dropbase, Vim.so, Calmcode; update: Striveworks, TalkPython and TestDriven.io. PR [#&#8203;4805](https://github.com/tiangolo/fastapi/pull/4805) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆️ Upgrade Codecov GitHub Action. PR [#&#8203;4801](https://github.com/tiangolo/fastapi/pull/4801) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.75.1`](https://github.com/tiangolo/fastapi/releases/tag/0.75.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.75.0...0.75.1) ##### Translations - 🌐 Start Dutch translations. PR [#&#8203;4703](https://github.com/tiangolo/fastapi/pull/4703) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🌐 Start Persian/Farsi translations. PR [#&#8203;4243](https://github.com/tiangolo/fastapi/pull/4243) by [@&#8203;aminalaee](https://github.com/aminalaee). - ✏ Reword sentence about handling errors. PR [#&#8203;1993](https://github.com/tiangolo/fastapi/pull/1993) by [@&#8203;khuhroproeza](https://github.com/khuhroproeza). ##### Internal - 👥 Update FastAPI People. PR [#&#8203;4752](https://github.com/tiangolo/fastapi/pull/4752) by [@&#8203;github-actions\[bot\]](https://github.com/apps/github-actions). - ➖ Temporarily remove typer-cli from dependencies and upgrade Black to unblock Pydantic CI. PR [#&#8203;4754](https://github.com/tiangolo/fastapi/pull/4754) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Add configuration to notify Dutch translations. PR [#&#8203;4702](https://github.com/tiangolo/fastapi/pull/4702) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👥 Update FastAPI People. PR [#&#8203;4699](https://github.com/tiangolo/fastapi/pull/4699) by [@&#8203;github-actions\[bot\]](https://github.com/apps/github-actions). - 🐛 Fix FastAPI People generation to include missing file in commit. PR [#&#8203;4695](https://github.com/tiangolo/fastapi/pull/4695) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update Classiq sponsor links. PR [#&#8203;4688](https://github.com/tiangolo/fastapi/pull/4688) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Add Classiq sponsor. PR [#&#8203;4671](https://github.com/tiangolo/fastapi/pull/4671) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Add Jina's QA Bot to the docs to help people that want to ask quick questions. PR [#&#8203;4655](https://github.com/tiangolo/fastapi/pull/4655) by [@&#8203;tiangolo](https://github.com/tiangolo) based on original PR [#&#8203;4626](https://github.com/tiangolo/fastapi/pull/4626) by [@&#8203;hanxiao](https://github.com/hanxiao). ### [`v0.75.0`](https://github.com/tiangolo/fastapi/releases/tag/0.75.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.74.1...0.75.0) ##### Features - ✨ Add support for custom `generate_unique_id_function` and docs for generating clients. New docs: [Advanced - Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/). PR [#&#8203;4650](https://github.com/tiangolo/fastapi/pull/4650) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.74.1`](https://github.com/tiangolo/fastapi/releases/tag/0.74.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.74.0...0.74.1) ##### Features - ✨ Include route in scope to allow middleware and other tools to extract its information. PR [#&#8203;4603](https://github.com/tiangolo/fastapi/pull/4603) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.74.0`](https://github.com/tiangolo/fastapi/releases/tag/0.74.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.73.0...0.74.0) ##### Breaking Changes - ✨ Update internal `AsyncExitStack` to fix context for dependencies with `yield`. PR [#&#8203;4575](https://github.com/tiangolo/fastapi/pull/4575) by [@&#8203;tiangolo](https://github.com/tiangolo). Dependencies with `yield` can now catch `HTTPException` and custom exceptions. For example: ```Python async def get_database(): with Session() as session: try: yield session except HTTPException: session.rollback() raise finally: session.close() ``` After the dependency with `yield` handles the exception (or not) the exception is raised again. So that any exception handlers can catch it, or ultimately the default internal `ServerErrorMiddleware`. If you depended on exceptions not being received by dependencies with `yield`, and receiving an exception breaks the code after `yield`, you can use a block with `try` and `finally`: ```Python async def do_something(): try: yield something finally: some_cleanup() ``` ...that way the `finally` block is run regardless of any exception that might happen. ##### Features - The same PR [#&#8203;4575](https://github.com/tiangolo/fastapi/pull/4575) from above also fixes the `contextvars` context for the code before and after `yield`. This was the main objective of that PR. This means that now, if you set a value in a context variable before `yield`, the value would still be available after `yield` (as you would intuitively expect). And it also means that you can reset the context variable with a token afterwards. For example, this works correctly now: ```Python from contextvars import ContextVar from typing import Any, Dict, Optional legacy_request_state_context_var: ContextVar[Optional[Dict[str, Any]]] = ContextVar( "legacy_request_state_context_var", default=None ) async def set_up_request_state_dependency(): request_state = {"user": "deadpond"} contextvar_token = legacy_request_state_context_var.set(request_state) yield request_state legacy_request_state_context_var.reset(contextvar_token) ``` ...before this change it would raise an error when resetting the context variable, because the `contextvars` context was different, because of the way it was implemented. **Note**: You probably don't need `contextvars`, and you should probably avoid using them. But they are powerful and useful in some advanced scenarios, for example, migrating from code that used Flask's `g` semi-global variable. **Technical Details**: If you want to know more of the technical details you can check out the PR description [#&#8203;4575](https://github.com/tiangolo/fastapi/pull/4575). ##### Internal - 🔧 Add Striveworks sponsor. PR [#&#8203;4596](https://github.com/tiangolo/fastapi/pull/4596) by [@&#8203;tiangolo](https://github.com/tiangolo). - 💚 Only build docs on push when on master to avoid duplicate runs from PRs. PR [#&#8203;4564](https://github.com/tiangolo/fastapi/pull/4564) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👥 Update FastAPI People. PR [#&#8203;4502](https://github.com/tiangolo/fastapi/pull/4502) by [@&#8203;github-actions\[bot\]](https://github.com/apps/github-actions). ### [`v0.73.0`](https://github.com/tiangolo/fastapi/releases/tag/0.73.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.72.0...0.73.0) ##### Features - ✨ Add support for declaring `UploadFile` parameters without explicit `File()`. PR [#&#8203;4469](https://github.com/tiangolo/fastapi/pull/4469) by [@&#8203;tiangolo](https://github.com/tiangolo). New docs: [Request Files - File Parameters with UploadFile](https://fastapi.tiangolo.com/tutorial/request-files/#file-parameters-with-uploadfile). - ✨ Add support for tags with Enums. PR [#&#8203;4468](https://github.com/tiangolo/fastapi/pull/4468) by [@&#8203;tiangolo](https://github.com/tiangolo). New docs: [Path Operation Configuration - Tags with Enums](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/#tags-with-enums). - ✨ Allow hiding from OpenAPI (and Swagger UI) `Query`, `Cookie`, `Header`, and `Path` parameters. PR [#&#8203;3144](https://github.com/tiangolo/fastapi/pull/3144) by [@&#8203;astraldawn](https://github.com/astraldawn). New docs: [Query Parameters and String Validations - Exclude from OpenAPI](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi). ##### Docs - 📝 Tweak and improve docs for Request Files. PR [#&#8203;4470](https://github.com/tiangolo/fastapi/pull/4470) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Fixes - 🐛 Fix bug preventing to use OpenAPI when using tuples. PR [#&#8203;3874](https://github.com/tiangolo/fastapi/pull/3874) by [@&#8203;victorbenichoux](https://github.com/victorbenichoux). - 🐛 Prefer custom encoder over defaults if specified in `jsonable_encoder`. PR [#&#8203;2061](https://github.com/tiangolo/fastapi/pull/2061) by [@&#8203;viveksunder](https://github.com/viveksunder). - 💚 Duplicate PR to trigger CI. PR [#&#8203;4467](https://github.com/tiangolo/fastapi/pull/4467) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Internal - 🐛 Fix docs dependencies cache, to get the latest Material for MkDocs. PR [#&#8203;4466](https://github.com/tiangolo/fastapi/pull/4466) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Add sponsor Dropbase. PR [#&#8203;4465](https://github.com/tiangolo/fastapi/pull/4465) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.72.0`](https://github.com/tiangolo/fastapi/releases/tag/0.72.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.71.0...0.72.0) ##### Features - ✨ Enable configuring Swagger UI parameters. Original PR [#&#8203;2568](https://github.com/tiangolo/fastapi/pull/2568) by [@&#8203;jmriebold](https://github.com/jmriebold). Here are the new docs: [Configuring Swagger UI](https://fastapi.tiangolo.com/advanced/extending-openapi/#configuring-swagger-ui). ##### Docs - 📝 Update Python Types docs, add missing 3.6 / 3.9 example. PR [#&#8203;4434](https://github.com/tiangolo/fastapi/pull/4434) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Translations - 🌐 Update Chinese translation for `docs/help-fastapi.md`. PR [#&#8203;3847](https://github.com/tiangolo/fastapi/pull/3847) by [@&#8203;jaystone776](https://github.com/jaystone776). - 🌐 Fix Korean translation for `docs/ko/docs/index.md`. PR [#&#8203;4195](https://github.com/tiangolo/fastapi/pull/4195) by [@&#8203;kty4119](https://github.com/kty4119). - 🌐 Add Polish translation for `docs/pl/docs/index.md`. PR [#&#8203;4245](https://github.com/tiangolo/fastapi/pull/4245) by [@&#8203;MicroPanda123](https://github.com/MicroPanda123). - 🌐 Add Chinese translation for `docs\tutorial\path-operation-configuration.md`. PR [#&#8203;3312](https://github.com/tiangolo/fastapi/pull/3312) by [@&#8203;jaystone776](https://github.com/jaystone776). ##### Internal - 🔧 Enable MkDocs Material Insiders' `content.tabs.link`. PR [#&#8203;4399](https://github.com/tiangolo/fastapi/pull/4399) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.71.0`](https://github.com/tiangolo/fastapi/releases/tag/0.71.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.70.1...0.71.0) ##### Features - ✨ Add docs and tests for Python 3.9 and Python 3.10. PR [#&#8203;3712](https://github.com/tiangolo/fastapi/pull/3712) by [@&#8203;tiangolo](https://github.com/tiangolo). - You can start with [Python Types Intro](https://fastapi.tiangolo.com/python-types/), it explains what changes between different Python versions, in Python 3.9 and in Python 3.10. - All the FastAPI docs are updated. Each code example in the docs that could use different syntax in Python 3.9 or Python 3.10 now has all the alternatives in tabs. - ⬆️ Upgrade Starlette to 0.17.1. PR [#&#8203;4145](https://github.com/tiangolo/fastapi/pull/4145) by [@&#8203;simondale00](https://github.com/simondale00). ##### Internal - 👥 Update FastAPI People. PR [#&#8203;4354](https://github.com/tiangolo/fastapi/pull/4354) by [@&#8203;github-actions\[bot\]](https://github.com/apps/github-actions). - 🔧 Add FastAPI Trove Classifier for PyPI as now there's one 🤷😁. PR [#&#8203;4386](https://github.com/tiangolo/fastapi/pull/4386) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ Upgrade MkDocs Material and configs. PR [#&#8203;4385](https://github.com/tiangolo/fastapi/pull/4385) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.70.1`](https://github.com/tiangolo/fastapi/releases/tag/0.70.1) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.70.0...0.70.1) There's nothing interesting in this particular FastAPI release. It is mainly to enable/unblock the release of the next version of Pydantic that comes packed with features and improvements. 🤩 ##### Fixes - 🐛 Fix JSON Schema for dataclasses, supporting the fixes in Pydantic 1.9. PR [#&#8203;4272](https://github.com/tiangolo/fastapi/pull/4272) by [@&#8203;PrettyWood](https://github.com/PrettyWood). ##### Translations - 🌐 Add Korean translation for `docs/tutorial/request-forms-and-files.md`. PR [#&#8203;3744](https://github.com/tiangolo/fastapi/pull/3744) by [@&#8203;NinaHwang](https://github.com/NinaHwang). - 🌐 Add Korean translation for `docs/tutorial/request-files.md`. PR [#&#8203;3743](https://github.com/tiangolo/fastapi/pull/3743) by [@&#8203;NinaHwang](https://github.com/NinaHwang). - 🌐 Add portuguese translation for `docs/tutorial/query-params-str-validations.md`. PR [#&#8203;3965](https://github.com/tiangolo/fastapi/pull/3965) by [@&#8203;leandrodesouzadev](https://github.com/leandrodesouzadev). - 🌐 Add Korean translation for `docs/tutorial/response-status-code.md`. PR [#&#8203;3742](https://github.com/tiangolo/fastapi/pull/3742) by [@&#8203;NinaHwang](https://github.com/NinaHwang). - 🌐 Add Korean translation for Tutorial - JSON Compatible Encoder. PR [#&#8203;3152](https://github.com/tiangolo/fastapi/pull/3152) by [@&#8203;NEONKID](https://github.com/NEONKID). - 🌐 Add Korean translation for Tutorial - Path Parameters and Numeric Validations. PR [#&#8203;2432](https://github.com/tiangolo/fastapi/pull/2432) by [@&#8203;hard-coders](https://github.com/hard-coders). - 🌐 Add Korean translation for `docs/ko/docs/deployment/versions.md`. PR [#&#8203;4121](https://github.com/tiangolo/fastapi/pull/4121) by [@&#8203;DevDae](https://github.com/DevDae). - 🌐 Fix Korean translation for `docs/ko/docs/tutorial/index.md`. PR [#&#8203;4193](https://github.com/tiangolo/fastapi/pull/4193) by [@&#8203;kimjaeyoonn](https://github.com/kimjaeyoonn). - 🔧 Add CryptAPI sponsor. PR [#&#8203;4264](https://github.com/tiangolo/fastapi/pull/4264) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Update `docs/tutorial/dependencies/classes-as-dependencies`: Add type of query parameters in a description of `Classes as dependencies`. PR [#&#8203;4015](https://github.com/tiangolo/fastapi/pull/4015) by [@&#8203;0417taehyun](https://github.com/0417taehyun). - 🌐 Add French translation for Tutorial - First steps. PR [#&#8203;3455](https://github.com/tiangolo/fastapi/pull/3455) by [@&#8203;Smlep](https://github.com/Smlep). - 🌐 Add French translation for `docs/tutorial/path-params.md`. PR [#&#8203;3548](https://github.com/tiangolo/fastapi/pull/3548) by [@&#8203;Smlep](https://github.com/Smlep). - 🌐 Add French translation for `docs/tutorial/query-params.md`. PR [#&#8203;3556](https://github.com/tiangolo/fastapi/pull/3556) by [@&#8203;Smlep](https://github.com/Smlep). - 🌐 Add Turkish translation for `docs/python-types.md`. PR [#&#8203;3926](https://github.com/tiangolo/fastapi/pull/3926) by [@&#8203;BilalAlpaslan](https://github.com/BilalAlpaslan). ##### Internal - 👥 Update FastAPI People. PR [#&#8203;4274](https://github.com/tiangolo/fastapi/pull/4274) by [@&#8203;github-actions\[bot\]](https://github.com/apps/github-actions). ### [`v0.70.0`](https://github.com/tiangolo/fastapi/releases/tag/0.70.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.69.0...0.70.0) This release just upgrades Starlette to the latest version, `0.16.0`, which includes several bug fixes and some small breaking changes. These last **three consecutive releases** are independent so that you can **migrate gradually**: - First to FastAPI `0.68.2`, with no breaking changes, but upgrading all the sub-dependencies. - Next to FastAPI `0.69.0`, which upgrades Starlette to `0.15.0`, with AnyIO support, and a higher chance of having breaking changes in your code. - Finally to FastAPI `0.70.0`, just upgrading Starlette to the latest version `0.16.0` with additional bug fixes. This way, in case there was a breaking change for your code in one of the releases, you can still benefit from the previous upgrades. ✨ ##### Breaking Changes - Upgrade - ⬆️ Upgrade Starlette to 0.16.0. PR [#&#8203;4016](https://github.com/tiangolo/fastapi/pull/4016) by [@&#8203;tiangolo](https://github.com/tiangolo). Also upgrades the ranges of optional dependencies: - `"jinja2 >=2.11.2,<4.0.0"` - `"itsdangerous >=1.1.0,<3.0.0"` ### [`v0.69.0`](https://github.com/tiangolo/fastapi/releases/tag/0.69.0) [Compare Source](https://github.com/tiangolo/fastapi/compare/0.68.2...0.69.0) ##### Breaking Changes - Upgrade This release adds support for [Trio](https://trio.readthedocs.io/en/stable/). ✨ It upgrades the version of Starlette to `0.15.0`, now based on [AnyIO](https://anyio.readthedocs.io/en/stable/), and the internal async components in **FastAPI** are now based on AnyIO as well, making it compatible with both **asyncio** and **Trio**. You can read the docs about running [FastAPI with Trio using Hypercorn](https://fastapi.tiangolo.com/deployment/manually/#hypercorn-with-trio). This release also removes `graphene` as an optional dependency for GraphQL. If you need to work with GraphQL, the recommended library now is [Strawberry](https://strawberry.rocks/). You can read the new [FastAPI with GraphQL docs](https://fastapi.tiangolo.com/advanced/graphql/). ##### Features - ✨ Add support for Trio via AnyIO, upgrading Starlette to `0.15.0`. PR [#&#8203;3372](https://github.com/tiangolo/fastapi/pull/3372) by [@&#8203;graingert](https://github.com/graingert). - ➖ Remove `graphene` as an optional dependency. PR [#&#8203;4007](https://github.com/tiangolo/fastapi/pull/4007) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Docs - 📝 Add docs for using Trio with Hypercorn. PR [#&#8203;4014](https://github.com/tiangolo/fastapi/pull/4014) by [@&#8203;tiangolo](https://github.com/tiangolo). - ✏ Fix typos in Deployment Guide. PR [#&#8203;3975](https://github.com/tiangolo/fastapi/pull/3975) by [@&#8203;ghandic](https://github.com/ghandic). - 📝 Update docs with pip install calls when using extras with brackets, use quotes for compatibility with Zsh. PR [#&#8203;3131](https://github.com/tiangolo/fastapi/pull/3131) by [@&#8203;tomwei7](https://github.com/tomwei7). - 📝 Add external link to article: Deploying ML Models as API Using FastAPI and Heroku. PR [#&#8203;3904](https://github.com/tiangolo/fastapi/pull/3904) by [@&#8203;kaustubhgupta](https://github.com/kaustubhgupta). - ✏ Fix typo in file paths in `docs/en/docs/contributing.md`. PR [#&#8203;3752](https://github.com/tiangolo/fastapi/pull/3752) by [@&#8203;NinaHwang](https://github.com/NinaHwang). - ✏ Fix a typo in `docs/en/docs/advanced/path-operation-advanced-configuration.md` and `docs/en/docs/release-notes.md`. PR [#&#8203;3750](https://github.com/tiangolo/fastapi/pull/3750) by [@&#8203;saintmalik](https://github.com/saintmalik). - ✏️ Add a missing comma in the security tutorial. PR [#&#8203;3564](https://github.com/tiangolo/fastapi/pull/3564) by [@&#8203;jalvaradosegura](https://github.com/jalvaradosegura). - ✏ Fix typo in `docs/en/docs/help-fastapi.md`. PR [#&#8203;3760](https://github.com/tiangolo/fastapi/pull/3760) by [@&#8203;jaystone776](https://github.com/jaystone776). - ✏ Fix typo about file path in `docs/en/docs/tutorial/bigger-applications.md`. PR [#&#8203;3285](https://github.com/tiangolo/fastapi/pull/3285) by [@&#8203;HolyDorus](https://github.com/HolyDorus). - ✏ Re-word to clarify test client in `docs/en/docs/tutorial/testing.md`. PR [#&#8203;3382](https://github.com/tiangolo/fastapi/pull/3382) by [@&#8203;Bharat123rox](https://github.com/Bharat123rox). - 📝 Fix incorrect highlighted code. PR [#&#8203;3325](https://github.com/tiangolo/fastapi/pull/3325) by [@&#8203;paxcodes](https://github.com/paxcodes). - 📝 Add external link to article: How-to deploy FastAPI app to Heroku. PR [#&#8203;3241](https://github.com/tiangolo/fastapi/pull/3241) by [@&#8203;Jarmos-san](https://github.com/Jarmos-san). - ✏ Fix typo (mistranslation) in `docs/en/docs/advanced/templates.md`. PR [#&#8203;3211](https://github.com/tiangolo/fastapi/pull/3211) by [@&#8203;oerpli](https://github.com/oerpli). - 📝 Remove note about (now supported) feature from Swagger UI in `docs/en/docs/tutorial/request-files.md`. PR [#&#8203;2803](https://github.com/tiangolo/fastapi/pull/2803) by [@&#8203;gsganden](https://github.com/gsganden). - ✏ Fix typo re-word in `docs/tutorial/handling-errors.md`. PR [#&#8203;2700](https://github.com/tiangolo/fastapi/pull/2700) by [@&#8203;graue70](https://github.com/graue70). ##### Translations - 🌐 Initialize Azerbaijani translations. PR [#&#8203;3941](https://github.com/tiangolo/fastapi/pull/3941) by [@&#8203;madatbay](https://github.com/madatbay). - 🌐 Add Turkish translation for `docs/fastapi-people.md`. PR [#&#8203;3848](https://github.com/tiangolo/fastapi/pull/3848) by [@&#8203;BilalAlpaslan](https://github.com/BilalAlpaslan). ##### Internal - 📝 Add supported Python versions badge. PR [#&#8203;2794](https://github.com/tiangolo/fastapi/pull/2794) by [@&#8203;hramezani](https://github.com/hramezani). - ✏ Fix link in Japanese docs for `docs/ja/docs/deployment/docker.md`. PR [#&#8203;3245](https://github.com/tiangolo/fastapi/pull/3245) by [@&#8203;utamori](https://github.com/utamori). - 🔧 Correct DeprecationWarning config and comment in pytest settings. PR [#&#8203;4008](https://github.com/tiangolo/fastapi/pull/4008) by [@&#8203;graingert](https://github.com/graingert). - 🔧 Swap light/dark theme button icon. PR [#&#8203;3246](https://github.com/tiangolo/fastapi/pull/3246) by [@&#8203;eddsalkield](https://github.com/eddsalkield). - 🔧 Lint only in Python 3.7 and above. PR [#&#8203;4006](https://github.com/tiangolo/fastapi/pull/4006) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Add GitHub Action notify-translations config for Azerbaijani. PR [#&#8203;3995](https://github.com/tiangolo/fastapi/pull/3995) by [@&#8203;tiangolo](https://github.com/tiangolo). </details> --- ### 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 becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xODIuMyIsInVwZGF0ZWRJblZlciI6IjM3LjE4Mi4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
renovate added 1 commit 2024-02-18 17:18:10 +00:00
marco merged commit b30c500009 into main 2024-02-18 17:19:48 +00:00
marco deleted branch renovate/fastapi-0.x 2024-02-18 17:19:48 +00:00
Author
Member

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (==0.109.2). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

### Renovate Ignore Notification Because you closed this PR without merging, Renovate will ignore this update (`==0.109.2`). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the `ignoreDeps` array of your Renovate config. If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.
marco started working 2024-03-03 07:23:23 +00:00
marco worked for 4 seconds 2024-03-03 07:23:27 +00:00
marco requested review from marco 2024-03-03 07:23:45 +00:00
marco self-assigned this 2024-03-03 07:23:57 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Total Time Spent: 4 seconds
marco
4 seconds
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: training/docker-build-exercise#3