Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Pin fastapi to latest version 0.85.2 #132

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pyup-bot
Copy link
Collaborator

This PR pins fastapi to the latest release 0.85.2.

Changelog

0.85.1

Fixes

* 🐛 Fix support for strings in OpenAPI status codes: `default`, `1XX`, `2XX`, `3XX`, `4XX`, `5XX`. PR [5187](https://github.com/tiangolo/fastapi/pull/5187) by [JarroVGIT](https://github.com/JarroVGIT).

Docs

* 📝 Add WayScript x FastAPI Tutorial to External Links section. PR [5407](https://github.com/tiangolo/fastapi/pull/5407) by [moneeka](https://github.com/moneeka).

Internal

* 👥 Update FastAPI People. PR [5447](https://github.com/tiangolo/fastapi/pull/5447) by [github-actions[bot]](https://github.com/apps/github-actions).
* 🔧 Disable Material for MkDocs search plugin. PR [5495](https://github.com/tiangolo/fastapi/pull/5495) by [tiangolo](https://github.com/tiangolo).
* 🔇 Ignore Trio warning in tests for CI. PR [5483](https://github.com/tiangolo/fastapi/pull/5483) by [samuelcolvin](https://github.com/samuelcolvin).

0.85.0

Features

* ⬆ Upgrade version required of Starlette from `0.19.1` to `0.20.4`. Initial PR [4820](https://github.com/tiangolo/fastapi/pull/4820) by [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 [5401](https://github.com/tiangolo/fastapi/pull/5401) by [tiangolo](https://github.com/tiangolo).

Internal

* ⬆️ Upgrade dependencies for doc and dev internal extras: Typer, Uvicorn. PR [5400](https://github.com/tiangolo/fastapi/pull/5400) by [tiangolo](https://github.com/tiangolo).
* ⬆️ Upgrade test dependencies: Black, HTTPX, databases, types-ujson. PR [5399](https://github.com/tiangolo/fastapi/pull/5399) by [tiangolo](https://github.com/tiangolo).
* ⬆️ Upgrade mypy and tweak internal type annotations. PR [5398](https://github.com/tiangolo/fastapi/pull/5398) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update test dependencies, upgrade Pytest, move dependencies from dev to test. PR [5396](https://github.com/tiangolo/fastapi/pull/5396) by [tiangolo](https://github.com/tiangolo).

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 [5240](https://github.com/tiangolo/fastapi/pull/5240) by [ofek](https://github.com/ofek).

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 [4923](https://github.com/tiangolo/fastapi/pull/4923) by [DCsunset](https://github.com/DCsunset).

Fixes

* 🐛 Fix `RuntimeError` raised when `HTTPException` has a status code with no content. PR [5365](https://github.com/tiangolo/fastapi/pull/5365) by [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 [5360](https://github.com/tiangolo/fastapi/pull/5360) by [tmeckel](https://github.com/tmeckel).

Docs

* 📝 Update `SECURITY.md`. PR [5377](https://github.com/tiangolo/fastapi/pull/5377) by [Kludex](https://github.com/Kludex).

Internal

* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [5352](https://github.com/tiangolo/fastapi/pull/5352) by [pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).

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 [4376](https://github.com/tiangolo/fastapi/pull/4376) by [matiuszka](https://github.com/matiuszka).
* ✨ Support Python internal description on Pydantic model's docstring. PR [3032](https://github.com/tiangolo/fastapi/pull/3032) by [Kludex](https://github.com/Kludex).
* ✨ Update `ORJSONResponse` to support non `str` keys and serializing Numpy arrays. PR [3892](https://github.com/tiangolo/fastapi/pull/3892) by [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 [5122](https://github.com/tiangolo/fastapi/pull/5122) by [adriangb](https://github.com/adriangb).
* 🐛 Fix FastAPI People GitHub Action: set HTTPX timeout for GraphQL query request. PR [5222](https://github.com/tiangolo/fastapi/pull/5222) by [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 [4319](https://github.com/tiangolo/fastapi/pull/4319) by [cd17822](https://github.com/cd17822).
* 🐛 Fix support for path parameters in WebSockets. PR [3879](https://github.com/tiangolo/fastapi/pull/3879) by [davidbrochart](https://github.com/davidbrochart).

Docs

* ✏ Update Hypercorn link, now pointing to GitHub. PR [5346](https://github.com/tiangolo/fastapi/pull/5346) by [baconfield](https://github.com/baconfield).
* ✏ Tweak wording in `docs/en/docs/advanced/dataclasses.md`. PR [3698](https://github.com/tiangolo/fastapi/pull/3698) by [pfackeldey](https://github.com/pfackeldey).
* 📝 Add note about Python 3.10 `X | Y` operator in explanation about Response Models. PR [5307](https://github.com/tiangolo/fastapi/pull/5307) by [MendyLanda](https://github.com/MendyLanda).
* 📝 Add link to New Relic article: "How to monitor FastAPI application performance using Python agent". PR [5260](https://github.com/tiangolo/fastapi/pull/5260) by [sjyothi54](https://github.com/sjyothi54).
* 📝 Update docs for `ORJSONResponse` with details about improving performance. PR [2615](https://github.com/tiangolo/fastapi/pull/2615) by [falkben](https://github.com/falkben).
* 📝 Add docs for creating a custom Response class. PR [5331](https://github.com/tiangolo/fastapi/pull/5331) by [tiangolo](https://github.com/tiangolo).
* 📝 Add tip about using alias for form data fields. PR [5329](https://github.com/tiangolo/fastapi/pull/5329) by [tiangolo](https://github.com/tiangolo).

Translations

* 🌐 Add Russian translation for `docs/ru/docs/features.md`. PR [5315](https://github.com/tiangolo/fastapi/pull/5315) by [Xewus](https://github.com/Xewus).
* 🌐 Update Chinese translation for `docs/zh/docs/tutorial/request-files.md`. PR [4529](https://github.com/tiangolo/fastapi/pull/4529) by [ASpathfinder](https://github.com/ASpathfinder).
* 🌐 Add Chinese translation for `docs/zh/docs/tutorial/encoder.md`. PR [4969](https://github.com/tiangolo/fastapi/pull/4969) by [Zssaer](https://github.com/Zssaer).
* 🌐 Fix MkDocs file line for Portuguese translation of `background-task.md`. PR [5242](https://github.com/tiangolo/fastapi/pull/5242) by [ComicShrimp](https://github.com/ComicShrimp).

Internal

* 👥 Update FastAPI People. PR [5347](https://github.com/tiangolo/fastapi/pull/5347) by [github-actions[bot]](https://github.com/apps/github-actions).
* ⬆ Bump dawidd6/action-download-artifact from 2.22.0 to 2.23.0. PR [5321](https://github.com/tiangolo/fastapi/pull/5321) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [5318](https://github.com/tiangolo/fastapi/pull/5318) by [pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ✏ Fix a small code highlight line error. PR [5256](https://github.com/tiangolo/fastapi/pull/5256) by [hjlarry](https://github.com/hjlarry).
* ♻ Internal small refactor, move `operation_id` parameter position in delete method for consistency with the code. PR [4474](https://github.com/tiangolo/fastapi/pull/4474) by [hiel](https://github.com/hiel).
* 🔧 Update sponsors, disable ImgWhale. PR [5338](https://github.com/tiangolo/fastapi/pull/5338) by [tiangolo](https://github.com/tiangolo).

0.81.0

Features

* ✨ Add ReDoc `<noscript>` warning when JS is disabled. PR [5074](https://github.com/tiangolo/fastapi/pull/5074) by [evroon](https://github.com/evroon).
* ✨ Add support for `FrozenSet` in parameters (e.g. query). PR [2938](https://github.com/tiangolo/fastapi/pull/2938) by [juntatalor](https://github.com/juntatalor).
* ✨ Allow custom middlewares to raise `HTTPException`s and propagate them. PR [2036](https://github.com/tiangolo/fastapi/pull/2036) by [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 [4057](https://github.com/tiangolo/fastapi/pull/4057) by [UKnowWhoIm](https://github.com/UKnowWhoIm).

Fixes

* 🐛 Fix `jsonable_encoder` for dataclasses with pydantic-compatible fields. PR [3607](https://github.com/tiangolo/fastapi/pull/3607) by [himbeles](https://github.com/himbeles).
* 🐛 Fix support for extending `openapi_extras` with parameter lists. PR [4267](https://github.com/tiangolo/fastapi/pull/4267) by [orilevari](https://github.com/orilevari).

Docs

* ✏ Fix a simple typo in `docs/en/docs/python-types.md`. PR [5193](https://github.com/tiangolo/fastapi/pull/5193) by [GlitchingCore](https://github.com/GlitchingCore).
* ✏ Fix typos in `tests/test_schema_extra_examples.py`. PR [5126](https://github.com/tiangolo/fastapi/pull/5126) by [supraaxdd](https://github.com/supraaxdd).
* ✏ Fix typos in `docs/en/docs/tutorial/path-params-numeric-validations.md`. PR [5142](https://github.com/tiangolo/fastapi/pull/5142) by [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 [5181](https://github.com/tiangolo/fastapi/pull/5181) by [edisnake](https://github.com/edisnake).
* ✏ Reword and clarify text in tutorial `docs/en/docs/tutorial/body-nested-models.md`. PR [5169](https://github.com/tiangolo/fastapi/pull/5169) by [papb](https://github.com/papb).
* ✏ Fix minor typo in `docs/en/docs/features.md`. PR [5206](https://github.com/tiangolo/fastapi/pull/5206) by [OtherBarry](https://github.com/OtherBarry).
* ✏ Fix minor typos in `docs/en/docs/async.md`. PR [5125](https://github.com/tiangolo/fastapi/pull/5125) by [Ksenofanex](https://github.com/Ksenofanex).
* 📝 Add external link to docs: "Fastapi, Docker(Docker compose) and Postgres". PR [5033](https://github.com/tiangolo/fastapi/pull/5033) by [krishnardt](https://github.com/krishnardt).
* 📝 Simplify example for docs for Additional Responses, remove unnecessary `else`. PR [4693](https://github.com/tiangolo/fastapi/pull/4693) by [adriangb](https://github.com/adriangb).
* 📝 Update docs, compare enums with identity instead of equality. PR [4905](https://github.com/tiangolo/fastapi/pull/4905) by [MicaelJarniac](https://github.com/MicaelJarniac).
* ✏ Fix typo in `docs/en/docs/python-types.md`. PR [4886](https://github.com/tiangolo/fastapi/pull/4886) by [MicaelJarniac](https://github.com/MicaelJarniac).
* 🎨 Fix syntax highlighting in docs for OpenAPI Callbacks. PR [4368](https://github.com/tiangolo/fastapi/pull/4368) by [xncbf](https://github.com/xncbf).
* ✏ Reword confusing sentence in docs file `typo-fix-path-params-numeric-validations.md`. PR [3219](https://github.com/tiangolo/fastapi/pull/3219) by [ccrenfroe](https://github.com/ccrenfroe).
* 📝 Update docs for handling HTTP Basic Auth with `secrets.compare_digest()` to account for non-ASCII characters. PR [3536](https://github.com/tiangolo/fastapi/pull/3536) by [lewoudar](https://github.com/lewoudar).
* 📝 Update docs for testing, fix examples with relative imports. PR [5302](https://github.com/tiangolo/fastapi/pull/5302) by [tiangolo](https://github.com/tiangolo).

Translations

* 🌐 Add Russian translation for `docs/ru/docs/index.md`. PR [5289](https://github.com/tiangolo/fastapi/pull/5289) by [impocode](https://github.com/impocode).
* 🌐 Add Russian translation for `docs/ru/docs/deployment/versions.md`. PR [4985](https://github.com/tiangolo/fastapi/pull/4985) by [emp7yhead](https://github.com/emp7yhead).
* 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/header-params.md`. PR [4921](https://github.com/tiangolo/fastapi/pull/4921) by [batlopes](https://github.com/batlopes).
* 🌐 Update `ko/mkdocs.yml` for a missing link. PR [5020](https://github.com/tiangolo/fastapi/pull/5020) by [dalinaum](https://github.com/dalinaum).

Internal

* ⬆ Bump dawidd6/action-download-artifact from 2.21.1 to 2.22.0. PR [5258](https://github.com/tiangolo/fastapi/pull/5258) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [5196](https://github.com/tiangolo/fastapi/pull/5196) by [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 [5040](https://github.com/tiangolo/fastapi/pull/5040) by [raccoonyy](https://github.com/raccoonyy).
* ♻ Simplify internal RegEx in `fastapi/utils.py`. PR [5057](https://github.com/tiangolo/fastapi/pull/5057) by [pylounge](https://github.com/pylounge).
* 🔧 Fix Type hint of `auto_error` which does not need to be `Optional[bool]`. PR [4933](https://github.com/tiangolo/fastapi/pull/4933) by [DavidKimDY](https://github.com/DavidKimDY).
* 🔧 Update mypy config, use `strict = true` instead of manual configs. PR [4605](https://github.com/tiangolo/fastapi/pull/4605) by [michaeloliverx](https://github.com/michaeloliverx).
* ♻ Change a `dict()` for `{}` in `fastapi/utils.py`. PR [3138](https://github.com/tiangolo/fastapi/pull/3138) by [ShahriyarR](https://github.com/ShahriyarR).
* ♻ Move internal variable for errors in `jsonable_encoder` to put related code closer. PR [4560](https://github.com/tiangolo/fastapi/pull/4560) by [GuilleQP](https://github.com/GuilleQP).
* ♻ Simplify conditional assignment in `fastapi/dependencies/utils.py`. PR [4597](https://github.com/tiangolo/fastapi/pull/4597) by [cikay](https://github.com/cikay).
* ⬆ Upgrade version pin accepted for Flake8, for internal code, to `flake8 >=3.8.3,<6.0.0`. PR [4097](https://github.com/tiangolo/fastapi/pull/4097) by [jamescurtin](https://github.com/jamescurtin).
* 🍱 Update Jina banner, fix typo. PR [5301](https://github.com/tiangolo/fastapi/pull/5301) by [tiangolo](https://github.com/tiangolo).

0.80.0

Breaking Changes - Fixes

* 🐛 Fix `response_model` not invalidating `None`. PR [2725](https://github.com/tiangolo/fastapi/pull/2725) by [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()

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()

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()

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](https://github.com/tiangolo/fastapi/pull/3439) initial PR by [koonpeng](https://github.com/koonpeng).
* ♻ Strip empty whitespace from description extracted from docstrings. PR [2821](https://github.com/tiangolo/fastapi/pull/2821) by [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 [2945](https://github.com/tiangolo/fastapi/pull/2945) by [laggardkernel](https://github.com/laggardkernel).
* 🎨 Update type annotations for `response_model`, allow things like `Union[str, None]`. PR [5294](https://github.com/tiangolo/fastapi/pull/5294) by [tiangolo](https://github.com/tiangolo).

Translations

* 🌐 Fix typos in German translation for `docs/de/docs/features.md`. PR [4533](https://github.com/tiangolo/fastapi/pull/4533) by [0xflotus](https://github.com/0xflotus).
* 🌐 Add missing navigator for `encoder.md` in Korean translation. PR [5238](https://github.com/tiangolo/fastapi/pull/5238) by [joonas-yoon](https://github.com/joonas-yoon).
* (Empty PR merge by accident) [4913](https://github.com/tiangolo/fastapi/pull/4913).

0.79.1

Fixes

* 🐛 Fix `jsonable_encoder` using `include` and `exclude` parameters for non-Pydantic objects. PR [2606](https://github.com/tiangolo/fastapi/pull/2606) by [xaviml](https://github.com/xaviml).
* 🐛 Fix edge case with repeated aliases names not shown in OpenAPI. PR [2351](https://github.com/tiangolo/fastapi/pull/2351) by [klaa97](https://github.com/klaa97).
* 📝 Add misc dependency installs to tutorial docs. PR [2126](https://github.com/tiangolo/fastapi/pull/2126) by [TeoZosa](https://github.com/TeoZosa).

Docs

* 📝 Add note giving credit for illustrations to [Ketrina Thompson](https://www.instagram.com/ketrinadrawsalot/). PR [#5284](https://github.com/tiangolo/fastapi/pull/5284) by [tiangolo](https://github.com/tiangolo).
* ✏ Fix typo in `python-types.md`. PR [5116](https://github.com/tiangolo/fastapi/pull/5116) by [Kludex](https://github.com/Kludex).
* ✏ Fix typo in `docs/en/docs/python-types.md`. PR [5007](https://github.com/tiangolo/fastapi/pull/5007) by [atiabbz](https://github.com/atiabbz).
* 📝 Remove unneeded Django/Flask references from async topic intro. PR [5280](https://github.com/tiangolo/fastapi/pull/5280) by [carltongibson](https://github.com/carltongibson).
* ✨ Add illustrations for Concurrent burgers and Parallel burgers. PR [5277](https://github.com/tiangolo/fastapi/pull/5277) by [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 [4775](https://github.com/tiangolo/fastapi/pull/4775) by [batlopes](https://github.com/batlopes).
* 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/security/first-steps.md`. PR [4954](https://github.com/tiangolo/fastapi/pull/4954) by [FLAIR7](https://github.com/FLAIR7).
* 🌐 Add translation for `docs/zh/docs/advanced/response-cookies.md`. PR [4638](https://github.com/tiangolo/fastapi/pull/4638) by [zhangbo2012](https://github.com/zhangbo2012).
* 🌐  Add French translation for `docs/fr/docs/deployment/index.md`. PR [3689](https://github.com/tiangolo/fastapi/pull/3689) by [rjNemo](https://github.com/rjNemo).
* 🌐 Add Portuguese translation for `tutorial/handling-errors.md`. PR [4769](https://github.com/tiangolo/fastapi/pull/4769) by [frnsimoes](https://github.com/frnsimoes).
* 🌐 Add French translation for `docs/fr/docs/history-design-future.md`. PR [3451](https://github.com/tiangolo/fastapi/pull/3451) by [rjNemo](https://github.com/rjNemo).
* 🌐 Add Russian translation for `docs/ru/docs/tutorial/background-tasks.md`. PR [4854](https://github.com/tiangolo/fastapi/pull/4854) by [AdmiralDesu](https://github.com/AdmiralDesu).
* 🌐 Add Chinese translation for `docs/tutorial/security/first-steps.md`. PR [3841](https://github.com/tiangolo/fastapi/pull/3841) by [jaystone776](https://github.com/jaystone776).
* 🌐 Add Japanese translation for `docs/ja/docs/advanced/nosql-databases.md`. PR [4205](https://github.com/tiangolo/fastapi/pull/4205) by [sUeharaE4](https://github.com/sUeharaE4).
* 🌐 Add Indonesian translation for `docs/id/docs/tutorial/index.md`. PR [4705](https://github.com/tiangolo/fastapi/pull/4705) by [bas-baskara](https://github.com/bas-baskara).
* 🌐 Add Persian translation for `docs/fa/docs/index.md` and tweak right-to-left CSS. PR [2395](https://github.com/tiangolo/fastapi/pull/2395) by [mohsen-mahmoodi](https://github.com/mohsen-mahmoodi).

Internal

* 🔧 Update Jina sponsorship. PR [5283](https://github.com/tiangolo/fastapi/pull/5283) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update Jina sponsorship. PR [5272](https://github.com/tiangolo/fastapi/pull/5272) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update sponsors, Striveworks badge. PR [5179](https://github.com/tiangolo/fastapi/pull/5179) by [tiangolo](https://github.com/tiangolo).

0.79.0

Fixes - Breaking Changes

* 🐛 Fix removing body from status codes that do not support it. PR [5145](https://github.com/tiangolo/fastapi/pull/5145) by [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 [5050](https://github.com/tiangolo/fastapi/pull/5050) by [itay-raveh](https://github.com/itay-raveh).
* 🔧 Add config for Swedish translations notification. PR [5147](https://github.com/tiangolo/fastapi/pull/5147) by [tiangolo](https://github.com/tiangolo).
* 🌐 Start of Swedish translation. PR [5062](https://github.com/tiangolo/fastapi/pull/5062) by [MrRawbin](https://github.com/MrRawbin).
* 🌐 Add Japanese translation for `docs/ja/docs/advanced/index.md`. PR [5043](https://github.com/tiangolo/fastapi/pull/5043) by [wakabame](https://github.com/wakabame).
* 🌐🇵🇱 Add Polish translation for `docs/pl/docs/tutorial/first-steps.md`. PR [5024](https://github.com/tiangolo/fastapi/pull/5024) by [Valaraucoo](https://github.com/Valaraucoo).

Internal

* 🔧 Update translations notification for Hebrew. PR [5158](https://github.com/tiangolo/fastapi/pull/5158) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update Dependabot commit message. PR [5156](https://github.com/tiangolo/fastapi/pull/5156) by [tiangolo](https://github.com/tiangolo).
* ⬆ Bump actions/upload-artifact from 2 to 3. PR [5148](https://github.com/tiangolo/fastapi/pull/5148) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump actions/cache from 2 to 3. PR [5149](https://github.com/tiangolo/fastapi/pull/5149) by [dependabot[bot]](https://github.com/apps/dependabot).
* 🔧 Update sponsors badge configs. PR [5155](https://github.com/tiangolo/fastapi/pull/5155) by [tiangolo](https://github.com/tiangolo).
* 👥 Update FastAPI People. PR [5154](https://github.com/tiangolo/fastapi/pull/5154) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update Jina sponsor badges. PR [5151](https://github.com/tiangolo/fastapi/pull/5151) by [tiangolo](https://github.com/tiangolo).
* ⬆ Bump actions/checkout from 2 to 3. PR [5133](https://github.com/tiangolo/fastapi/pull/5133) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [5030](https://github.com/tiangolo/fastapi/pull/5030) by [pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆ Bump nwtgck/actions-netlify from 1.1.5 to 1.2.3. PR [5132](https://github.com/tiangolo/fastapi/pull/5132) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump codecov/codecov-action from 2 to 3. PR [5131](https://github.com/tiangolo/fastapi/pull/5131) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump dawidd6/action-download-artifact from 2.9.0 to 2.21.1. PR [5130](https://github.com/tiangolo/fastapi/pull/5130) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump actions/setup-python from 2 to 4. PR [5129](https://github.com/tiangolo/fastapi/pull/5129) by [dependabot[bot]](https://github.com/apps/dependabot).
* 👷 Add Dependabot. PR [5128](https://github.com/tiangolo/fastapi/pull/5128) by [tiangolo](https://github.com/tiangolo).
* ♻️ Move from `Optional[X]` to `Union[X, None]` for internal utils. PR [5124](https://github.com/tiangolo/fastapi/pull/5124) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update sponsors, remove Dropbase, add Doist. PR [5096](https://github.com/tiangolo/fastapi/pull/5096) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update sponsors, remove Classiq, add ImgWhale. PR [5079](https://github.com/tiangolo/fastapi/pull/5079) by [tiangolo](https://github.com/tiangolo).

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 [4906](https://github.com/tiangolo/fastapi/pull/4906) by [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()


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()


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()


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 [4908](https://github.com/tiangolo/fastapi/pull/4908) by [tiangolo](https://github.com/tiangolo).
* 🎨 Fix default value as set in tutorial for Path Operations Advanced Configurations. PR [4899](https://github.com/tiangolo/fastapi/pull/4899) by [tiangolo](https://github.com/tiangolo).
* 📝 Add documentation for redefined path operations. PR [4864](https://github.com/tiangolo/fastapi/pull/4864) by [madkinsz](https://github.com/madkinsz).
* 📝 Updates links for Celery documentation. PR [4736](https://github.com/tiangolo/fastapi/pull/4736) by [sammyzord](https://github.com/sammyzord).
* ✏ Fix example code with sets in tutorial for body nested models. PR [3030](https://github.com/tiangolo/fastapi/pull/3030) by [hitrust](https://github.com/hitrust).
* ✏ Fix links to Pydantic docs. PR [4670](https://github.com/tiangolo/fastapi/pull/4670) by [kinuax](https://github.com/kinuax).
* 📝 Update docs about Swagger UI self-hosting with newer source links. PR [4813](https://github.com/tiangolo/fastapi/pull/4813) by [Kastakin](https://github.com/Kastakin).
* 📝 Add link to external article: Building the Poll App From Django Tutorial With FastAPI And React. PR [4778](https://github.com/tiangolo/fastapi/pull/4778) by [jbrocher](https://github.com/jbrocher).
* 📝 Add OpenAPI warning to "Body - Fields" docs with extra schema extensions. PR [4846](https://github.com/tiangolo/fastapi/pull/4846) by [ml-evs](https://github.com/ml-evs).

Translations

* 🌐 Fix code examples in Japanese translation for `docs/ja/docs/tutorial/testing.md`. PR [4623](https://github.com/tiangolo/fastapi/pull/4623) by [hirotoKirimaru](https://github.com/hirotoKirimaru).

Internal

* ♻ Refactor dict value extraction to minimize key lookups `fastapi/utils.py`. PR [3139](https://github.com/tiangolo/fastapi/pull/3139) by [ShahriyarR](https://github.com/ShahriyarR).
* ✅ Add tests for required nonable parameters and body fields. PR [4907](https://github.com/tiangolo/fastapi/pull/4907) by [tiangolo](https://github.com/tiangolo).
* 👷 Fix installing Material for MkDocs Insiders in CI. PR [4897](https://github.com/tiangolo/fastapi/pull/4897) by [tiangolo](https://github.com/tiangolo).
* 👷 Add pre-commit CI instead of custom GitHub Action. PR [4896](https://github.com/tiangolo/fastapi/pull/4896) by [tiangolo](https://github.com/tiangolo).
* 👷 Add pre-commit GitHub Action workflow. PR [4895](https://github.com/tiangolo/fastapi/pull/4895) by [tiangolo](https://github.com/tiangolo).
* 📝 Add dark mode auto switch to docs based on OS preference. PR [4869](https://github.com/tiangolo/fastapi/pull/4869) by [ComicShrimp](https://github.com/ComicShrimp).
* 🔥 Remove un-used old pending tests, already covered in other places. PR [4891](https://github.com/tiangolo/fastapi/pull/4891) by [tiangolo](https://github.com/tiangolo).
* 🔧 Add Python formatting hooks to pre-commit. PR [4890](https://github.com/tiangolo/fastapi/pull/4890) by [tiangolo](https://github.com/tiangolo).
* 🔧 Add pre-commit with first config and first formatting pass. PR [4888](https://github.com/tiangolo/fastapi/pull/4888) by [tiangolo](https://github.com/tiangolo).
* 👷 Disable CI installing Material for MkDocs in forks. PR [4410](https://github.com/tiangolo/fastapi/pull/4410) by [dolfinus](https://github.com/dolfinus).

0.77.1

Upgrades

* ⬆ Upgrade Starlette from 0.19.0 to 0.19.1. PR [4819](https://github.com/tiangolo/fastapi/pull/4819) by [Kludex](https://github.com/Kludex).

Docs

* 📝 Add link to german article: REST-API Programmieren mittels Python und dem FastAPI Modul. PR [4624](https://github.com/tiangolo/fastapi/pull/4624) by [fschuermeyer](https://github.com/fschuermeyer).
* 📝 Add external link: PyCharm Guide to FastAPI. PR [4512](https://github.com/tiangolo/fastapi/pull/4512) by [mukulmantosh](https://github.com/mukulmantosh).
* 📝 Add external link to article: Building an API with FastAPI and Supabase and Deploying on Deta. PR [4440](https://github.com/tiangolo/fastapi/pull/4440) by [aUnicornDev](https://github.com/aUnicornDev).
* ✏ Fix small typo in `docs/en/docs/tutorial/security/first-steps.md`. PR [4515](https://github.com/tiangolo/fastapi/pull/4515) by [KikoIlievski](https://github.com/KikoIlievski).

Translations

* 🌐 Add Polish translation for `docs/pl/docs/tutorial/index.md`. PR [4516](https://github.com/tiangolo/fastapi/pull/4516) by [MKaczkow](https://github.com/MKaczkow).
* ✏ Fix typo in deployment. PR [4629](https://github.com/tiangolo/fastapi/pull/4629) by [raisulislam541](https://github.com/raisulislam541).
* 🌐 Add Portuguese translation for `docs/pt/docs/help-fastapi.md`. PR [4583](https://github.com/tiangolo/fastapi/pull/4583) by [mateusjs](https://github.com/mateusjs).

Internal

* 🔧 Add notifications in issue for Uzbek translations. PR [4884](https://github.com/tiangolo/fastapi/pull/4884) by [tiangolo](https://github.com/tiangolo).

0.77.0

Upgrades

* ⬆ Upgrade Starlette from 0.18.0 to 0.19.0. PR [4488](https://github.com/tiangolo/fastapi/pull/4488) by [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 [4414](https://github.com/tiangolo/fastapi/pull/4414) by [silvanmelchior](https://github.com/silvanmelchior).
* 📝 Add external link to article: 5 Advanced Features of FastAPI You Should Try. PR [4436](https://github.com/tiangolo/fastapi/pull/4436) by [kaustubhgupta](https://github.com/kaustubhgupta).
* ✏ Reword to improve legibility of docs about `TestClient`. PR [4389](https://github.com/tiangolo/fastapi/pull/4389) by [rgilton](https://github.com/rgilton).
* 📝 Add external link to blog post about Kafka, FastAPI, and Ably. PR [4044](https://github.com/tiangolo/fastapi/pull/4044) by [Ugbot](https://github.com/Ugbot).
* ✏ Fix typo in `docs/en/docs/tutorial/sql-databases.md`. PR [4875](https://github.com/tiangolo/fastapi/pull/4875) by [wpyoga](https://github.com/wpyoga).
* ✏ Fix typo in `docs/en/docs/async.md`. PR [4726](https://github.com/tiangolo/fastapi/pull/4726) by [Prezu](https://github.com/Prezu).

Translations

* 🌐 Update source example highlights for `docs/zh/docs/tutorial/query-params-str-validations.md`. PR [4237](https://github.com/tiangolo/fastapi/pull/4237) by [caimaoy](https://github.com/caimaoy).
* 🌐 Remove translation docs references to aiofiles as it's no longer needed since AnyIO. PR [3594](https://github.com/tiangolo/fastapi/pull/3594) by [alonme](https://github.com/alonme).
* ✏ 🌐 Fix typo in Portuguese translation for `docs/pt/docs/tutorial/path-params.md`. PR [4722](https://github.com/tiangolo/fastapi/pull/4722) by [CleoMenezesJr](https://github.com/CleoMenezesJr).
* 🌐 Fix live docs server for translations for some languages. PR [4729](https://github.com/tiangolo/fastapi/pull/4729) by [wakabame](https://github.com/wakabame).
* 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/cookie-params.md`. PR [4112](https://github.com/tiangolo/fastapi/pull/4112) by [lbmendes](https://github.com/lbmendes).
* 🌐 Fix French translation for `docs/tutorial/body.md`. PR [4332](https://github.com/tiangolo/fastapi/pull/4332) by [Smlep](https://github.com/Smlep).
* 🌐 Add Japanese translation for `docs/ja/docs/advanced/conditional-openapi.md`. PR [2631](https://github.com/tiangolo/fastapi/pull/2631) by [sh0nk](https://github.com/sh0nk).
* 🌐 Fix Japanese translation of `docs/ja/docs/tutorial/body.md`. PR [3062](https://github.com/tiangolo/fastapi/pull/3062) by [a-takahashi223](https://github.com/a-takahashi223).
* 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/background-tasks.md`. PR [2170](https://github.com/tiangolo/fastapi/pull/2170) by [izaguerreiro](https://github.com/izaguerreiro).
* 🌐 Add Portuguese translation for `docs/deployment/deta.md`. PR [4442](https://github.com/tiangolo/fastapi/pull/4442) by [lsglucas](https://github.com/lsglucas).
* 🌐 Add Russian translation for `docs/async.md`. PR [4036](https://github.com/tiangolo/fastapi/pull/4036) by [Winand](https://github.com/Winand).
* 🌐 Add Portuguese translation for `docs/tutorial/body.md`. PR [3960](https://github.com/tiangolo/fastapi/pull/3960) by [leandrodesouzadev](https://github.com/leandrodesouzadev).
* 🌐 Add Portuguese translation of `tutorial/extra-data-types.md`. PR [4077](https://github.com/tiangolo/fastapi/pull/4077) by [luccasmmg](https://github.com/luccasmmg).
* 🌐 Update German translation for `docs/features.md`. PR [3905](https://github.com/tiangolo/fastapi/pull/3905) by [jomue](https://github.com/jomue).

0.76.0

Upgrades

* ⬆ Upgrade Starlette from 0.17.1 to 0.18.0. PR [4483](https://github.com/tiangolo/fastapi/pull/4483) by [Kludex](https://github.com/Kludex).

Internal

* 👥 Update FastAPI People. PR [4847](https://github.com/tiangolo/fastapi/pull/4847) by [github-actions[bot]](https://github.com/apps/github-actions).
* 🔧 Add Budget Insight sponsor. PR [4824](https://github.com/tiangolo/fastapi/pull/4824) by [tiangolo](https://github.com/tiangolo).
* 🍱 Update sponsor, ExoFlare badge. PR [4822](https://github.com/tiangolo/fastapi/pull/4822) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update sponsors, enable Dropbase again, update TalkPython link. PR [4821](https://github.com/tiangolo/fastapi/pull/4821) by [tiangolo](https://github.com/tiangolo).

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 [4806](https://github.com/tiangolo/fastapi/pull/4806) by [tiangolo](https://github.com/tiangolo).
* 🐛 Fix JSON Schema for `ValidationError` at field `loc`. PR [3810](https://github.com/tiangolo/fastapi/pull/3810) by [dconathan](https://github.com/dconathan).
* 🐛 Fix support for prefix on APIRouter WebSockets. PR [2640](https://github.com/tiangolo/fastapi/pull/2640) by [Kludex](https://github.com/Kludex).

Upgrades

* ⬆️ Update ujson ranges for CVE-2021-45958. PR [4804](https://github.com/tiangolo/fastapi/pull/4804) by [tiangolo](https://github.com/tiangolo).
* ⬆️ Upgrade dependencies upper range for extras "all". PR [4803](https://github.com/tiangolo/fastapi/pull/4803) by [tiangolo](https://github.com/tiangolo).
* ⬆ Upgrade Swagger UI - swagger-ui-dist4. 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](https://github.com/tiangolo/fastapi/pull/4347) by [RAlanWright](https://github.com/RAlanWright).

Internal

* 🔧 Update sponsors, add: ExoFlare, Ines Course; remove: Dropbase, Vim.so, Calmcode; update: Striveworks, TalkPython and TestDriven.io. PR [4805](https://github.com/tiangolo/fastapi/pull/4805) by [tiangolo](https://github.com/tiangolo).
* ⬆️ Upgrade Codecov GitHub Action. PR [4801](https://github.com/tiangolo/fastapi/pull/4801) by [tiangolo](https://github.com/tiangolo).

0.75.1

Translations

* 🌐 Start Dutch translations. PR [4703](https://github.com/tiangolo/fastapi/pull/4703) by [tiangolo](https://github.com/tiangolo).
* 🌐 Start Persian/Farsi translations. PR [4243](https://github.com/tiangolo/fastapi/pull/4243) by [aminalaee](https://github.com/aminalaee).
* ✏ Reword sentence about handling errors. PR [1993](https://github.com/tiangolo/fastapi/pull/1993) by [khuhroproeza](https://github.com/khuhroproeza).

Internal

* 👥 Update FastAPI People. PR [4752](https://github.com/tiangolo/fastapi/pull/4752) by [github-actions[bot]](https://github.com/apps/github-actions).
* ➖ Temporarily remove typer-cli from dependencies and upgrade Black to unblock Pydantic CI. PR [4754](https://github.com/tiangolo/fastapi/pull/4754) by [tiangolo](https://github.com/tiangolo).
* 🔧 Add configuration to notify Dutch translations. PR [4702](https://github.com/tiangolo/fastapi/pull/4702) by [tiangolo](https://github.com/tiangolo).
* 👥 Update FastAPI People. PR [4699](https://github.com/tiangolo/fastapi/pull/4699) by [github-actions[bot]](https://github.com/apps/github-actions).
* 🐛 Fix FastAPI People generation to include missing file in commit. PR [4695](https://github.com/tiangolo/fastapi/pull/4695) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update Classiq sponsor links. PR [4688](https://github.com/tiangolo/fastapi/pull/4688) by [tiangolo](https://github.com/tiangolo).
* 🔧 Add Classiq sponsor. PR [4671](https://github.com/tiangolo/fastapi/pull/4671) by [tiangolo](https://github.com/tiangolo).
* 📝 Add Jina's QA Bot to the docs to help people that want to ask quick questions. PR [4655](https://github.com/tiangolo/fastapi/pull/4655) by [tiangolo](https://github.com/tiangolo) based on original PR [#4626](https://github.com/tiangolo/fastapi/pull/4626) by [hanxiao](https://github.com/hanxiao).

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 [#4650](https://github.com/tiangolo/fastapi/pull/4650) by [tiangolo](https://github.com/tiangolo).

0.74.1

Features

* ✨ Include route in scope to allow middleware and other tools to extract its information. PR [4603](https://github.com/tiangolo/fastapi/pull/4603) by [tiangolo](https://github.com/tiangolo).

0.74.0

Breaking Changes

* ✨ Update internal `AsyncExitStack` to fix context for dependencies with `yield`. PR [4575](https://github.com/tiangolo/fastapi/pull/4575) by [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 [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 [4575](https://github.com/tiangolo/fastapi/pull/4575).

Internal

* 🔧 Add Striveworks sponsor. PR [4596](https://github.com/tiangolo/fastapi/pull/4596) by [tiangolo](https://github.com/tiangolo).
* 💚 Only build docs on push when on master to avoid duplicate runs from PRs. PR [4564](https://github.com/tiangolo/fastapi/pull/4564) by [tiangolo](https://github.com/tiangolo).
* 👥 Update FastAPI People. PR [4502](https://github.com/tiangolo/fastapi/pull/4502) by [github-actions[bot]](https://github.com/apps/github-actions).

0.73.0

Features

* ✨ Add support for declaring `UploadFile` parameters without explicit `File()`. PR [4469](https://github.com/tiangolo/fastapi/pull/4469) by [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 [4468](https://github.com/tiangolo/fastapi/pull/4468) by [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 [3144](https://github.com/tiangolo/fastapi/pull/3144) by [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 [4470](https://github.com/tiangolo/fastapi/pull/4470) by [tiangolo](https://github.com/tiangolo).

Fixes

* 🐛 Fix bug preventing to use OpenAPI when using tuples. PR [3874](https://github.com/tiangolo/fastapi/pull/3874) by [victorbenichoux](https://github.com/victorbenichoux).
* 🐛 Prefer custom encoder over defaults if specified in `jsonable_encoder`. PR [2061](https://github.com/tiangolo/fastapi/pull/2061) by [viveksunder](https://github.com/viveksunder).
 * 💚 Duplicate PR to trigger CI. PR [4467](https://github.com/tiangolo/fastapi/pull/4467) by [tiangolo](https://github.com/tiangolo).

Internal

* 🐛 Fix docs dependencies cache, to get the latest Material for MkDocs. PR [4466](https://github.com/tiangolo/fastapi/pull/4466) by [tiangolo](https://github.com/tiangolo).
* 🔧 Add sponsor Dropbase. PR [4465](https://github.com/tiangolo/fastapi/pull/4465) by [tiangolo](https://github.com/tiangolo).

0.72.0

Features

* ✨ Enable configuring Swagger UI parameters. Original PR [2568](https://github.com/tiangolo/fastapi/pull/2568) by [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 [4434](https://github.com/tiangolo/fastapi/pull/4434) by [tiangolo](https://github.com/tiangolo).

Translations

* 🌐 Update Chinese translation for `docs/help-fastapi.md`. PR [3847](https://github.com/tiangolo/fastapi/pull/3847) by [jaystone776](https://github.com/jaystone776).
* 🌐 Fix Korean translation for `docs/ko/docs/index.md`. PR [4195](https://github.com/tiangolo/fastapi/pull/4195) by [kty4119](https://github.com/kty4119).
* 🌐 Add Polish translation for `docs/pl/docs/index.md`. PR [4245](https://github.com/tiangolo/fastapi/pull/4245) by [MicroPanda123](https://github.com/MicroPanda123).
* 🌐 Add Chinese translation for `docs\tutorial\path-operation-configuration.md`. PR [3312](https://github.com/tiangolo/fastapi/pull/3312) by [jaystone776](https://github.com/jaystone776).

Internal

* 🔧 Enable MkDocs Material Insiders' `content.tabs.link`. PR [4399](https://github.com/tiangolo/fastapi/pull/4399) by [tiangolo](https://github.com/tiangolo).

0.71.0

Features

* ✨ Add docs and tests for Python 3.9 and Python 3.10. PR [3712](https://github.com/tiangolo/fastapi/pull/3712) by [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 [4145](https://github.com/tiangolo/fastapi/pull/4145) by [simondale00](https://github.com/simondale00).

Internal

* 👥 Update FastAPI People. PR [4354](https://github.com/tiangolo/fastapi/pull/4354) by [github-actions[bot]](https://github.com/apps/github-actions).
* 🔧 Add FastAPI Trove Classifier for PyPI as now there's one 🤷😁. PR [4386](https://github.com/tiangolo/fastapi/pull/4386) by [tiangolo](https://github.com/tiangolo).
* ⬆ Upgrade MkDocs Material and configs. PR [4385](https://github.com/tiangolo/fastapi/pull/4385) by [tiangolo](https://github.com/tiangolo).

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 [4272](https://github.com/tiangolo/fastapi/pull/4272) by [PrettyWood](https://github.com/PrettyWood).

Translations

* 🌐 Add Korean translation for `docs/tutorial/request-forms-and-files.md`. PR [3744](https://github.com/tiangolo/fastapi/pull/3744) by [NinaHwang](https://github.com/NinaHwang).
* 🌐 Add Korean translation for `docs/tutorial/request-files.md`. PR [3743](https://github.com/tiangolo/fastapi/pull/3743) by [NinaHwang](https://github.com/NinaHwang).
* 🌐 Add portuguese translation for `docs/tutorial/query-params-str-validations.md`. PR [3965](https://github.com/tiangolo/fastapi/pull/3965) by [leandrodesouzadev](https://github.com/leandrodesouzadev).
* 🌐 Add Korean translation for `docs/tutorial/response-status-code.md`. PR [3742](https://github.com/tiangolo/fastapi/pull/3742) by [NinaHwang](https://github.com/NinaHwang).
* 🌐 Add Korean translation for Tutorial - JSON Compatible Encoder. PR [3152](https://github.com/tiangolo/fastapi/pull/3152) by [NEONKID](https://github.com/NEONKID).
* 🌐 Add Korean translation for Tutorial - Path Parameters and Numeric Validations. PR [2432](https://github.com/tiangolo/fastapi/pull/2432) by [hard-coders](https://github.com/hard-coders).
* 🌐 Add Korean translation for `docs/ko/docs/deployment/versions.md`. PR [4121](https://github.com/tiangolo/fastapi/pull/4121) by [DevDae](https://github.com/DevDae).
* 🌐 Fix Korean translation for `docs/ko/docs/tutorial/index.md`. PR [4193](https://github.com/tiangolo/fastapi/pull/4193) by [kimjaeyoonn](https://github.com/kimjaeyoonn).
* 🔧 Add CryptAPI sponsor. PR [4264](https://github.com/tiangolo/fastapi/pull/4264) by [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 [4015](https://github.com/tiangolo/fastapi/pull/4015) by [0417taehyun](https://github.com/0417taehyun).
* 🌐 Add French translation for Tutorial - First steps. PR [3455](https://github.com/tiangolo/fastapi/pull/3455) by [Smlep](https://github.com/Smlep).
* 🌐 Add French translation for `docs/tutorial/path-params.md`. PR [3548](https://github.com/tiangolo/fastapi/pull/3548) by [Smlep](https://github.com/Smlep).
* 🌐 Add French translation for `docs/tutorial/query-params.md`. PR [3556](https://github.com/tiangolo/fastapi/pull/3556) by [Smlep](https://github.com/Smlep).
* 🌐 Add Turkish translation for `docs/python-types.md`. PR [3926](https://github.com/tiangolo/fastapi/pull/3926) by [BilalAlpaslan](https://github.com/BilalAlpaslan).

Internal

* 👥 Update FastAPI People. PR [4274](https://github.com/tiangolo/fastapi/pull/4274) by [github-actions[bot]](https://github.com/apps/github-actions).

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 [4016](https://github.com/tiangolo/fastapi/pull/4016) by [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"`

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 [3372](https://github.com/tiangolo/fastapi/pull/3372) by [graingert](https://github.com/graingert).
* ➖ Remove `graphene` as an optional dependency. PR [4007](https://github.com/tiangolo/fastapi/pull/4007) by [tiangolo](https://github.com/tiangolo).

Docs

* 📝 Add docs for using Trio with Hypercorn. PR [4014](https://github.com/tiangolo/fastapi/pull/4014) by [tiangolo](https://github.com/tiangolo).
* ✏ Fix typos in Deployment Guide. PR [3975](https://github.com/tiangolo/fastapi/pull/3975) by [ghandic](https://github.com/ghandic).
* 📝 Update docs with pip install calls when using extras with brackets, use quotes for compatibility with Zsh. PR [3131](https://github.com/tiangolo/fastapi/pull/3131) by [tomwei7](https://github.com/tomwei7).
* 📝 Add external link to article: Deploying ML Models as API Using FastAPI and Heroku. PR [3904](https://github.com/tiangolo/fastapi/pull/3904) by [kaustubhgupta](https://github.com/kaustubhgupta).
* ✏ Fix typo in file paths in `docs/en/docs/contributing.md`. PR [3752](https://github.com/tiangolo/fastapi/pull/3752) by [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 [3750](https://github.com/tiangolo/fastapi/pull/3750) by [saintmalik](https://github.com/saintmalik).
* ✏️ Add a missing comma in the security tutorial. PR [3564](https://github.com/tiangolo/fastapi/pull/3564) by [jalvaradosegura](https://github.com/jalvaradosegura).
* ✏ Fix typo in `docs/en/docs/help-fastapi.md`. PR [3760](https://github.com/tiangolo/fastapi/pull/3760) by [jaystone776](https://github.com/jaystone776).
* ✏ Fix typo about file path in `docs/en/docs/tutorial/bigger-applications.md`. PR [3285](https://github.com/tiangolo/fastapi/pull/3285) by [HolyDorus](https://github.com/HolyDorus).
* ✏ Re-word to clarify test client in `docs/en/docs/tutorial/testing.md`. PR [3382](https://github.com/tiangolo/fastapi/pull/3382) by [Bharat123rox](https://github.com/Bharat123rox).
* 📝  Fix incorrect highlighted code. PR [3325](https://github.com/tiangolo/fastapi/pull/3325) by [paxcodes](https://github.com/paxcodes).
* 📝 Add external link to article: How-to deploy FastAPI app to Heroku. PR [3241](https://github.com/tiangolo/fastapi/pull/3241) by [Jarmos-san](https://github.com/Jarmos-san).
* ✏ Fix typo (mistranslation) in `docs/en/docs/advanced/templates.md`. PR [3211](https://github.com/tiangolo/fastapi/pull/3211) by [oerpli](https://github.com/oerpli).
* 📝 Remove note about (now supported) feature from Swagger UI in `docs/en/docs/tutorial/request-files.md`. PR [2803](https://github.com/tiangolo/fastapi/pull/2803) by [gsganden](https://github.com/gsganden).
* ✏ Fix typo re-word in `docs/tutorial/handling-errors.md`. PR [2700](https://github.com/tiangolo/fastapi/pull/2700) by [graue70](https://github.com/graue70).

Translations

* 🌐 Initialize Azerbaijani translations. PR [3941](https://github.com/tiangolo/fastapi/pull/3941) by [madatbay](https://github.com/madatbay).
* 🌐 Add Turkish translation for `docs/fastapi-people.md`. PR [3848](https://github.com/tiangolo/fastapi/pull/3848) by [BilalAlpaslan](https://github.com/BilalAlpaslan).

Internal

* 📝 Add supported Python versions badge. PR [2794](https://github.com/tiangolo/fastapi/pull/2794) by [hramezani](https://github.com/hramezani).
* ✏ Fix link in Japanese docs for `docs/ja/docs/deployment/docker.md`. PR [3245](https://github.com/tiangolo/fastapi/pull/3245) by [utamori](https://github.com/utamori).
* 🔧 Correct DeprecationWarning config and comment in pytest settings. PR [4008](https://github.com/tiangolo/fastapi/pull/4008) by [graingert](https://github.com/graingert).
* 🔧 Swap light/dark theme button icon. PR [3246](https://github.com/tiangolo/fastapi/pull/3246) by [eddsalkield](https://github.com/eddsalkield).
* 🔧 Lint only in Python 3.7 and above. PR [4006](https://github.com/tiangolo/fastapi/pull/4006) by [tiangolo](https://github.com/tiangolo).
* 🔧 Add GitHub Action notify-translations config for Azerbaijani. PR [3995](https://github.com/tiangolo/fastapi/pull/3995) by [tiangolo](https://github.com/tiangolo).

0.68.2

This release has **no breaking changes**. 🎉

It upgrades the version ranges of sub-dependencies to allow applications using FastAPI to easily upgrade them.

Soon there will be a new FastAPI release upgrading Starlette to take advantage of recent improvements, but as that has a higher chance of having breaking changes, it will be in a separate release.

Features

* ⬆Increase supported version of aiofiles to suppress warnings. PR [2899](https://github.com/tiangolo/fastapi/pull/2899) by [SnkSynthesis](https://github.com/SnkSynthesis).
* ➖ Do not require backports in Python >= 3.7. PR [1880](https://github.com/tiangolo/fastapi/pull/1880) by [FFY00](https://github.com/FFY00).
* ⬆ Upgrade required Python version to >= 3.6.1, needed by typing.Deque, used by Pydantic. PR [2733](https://github.com/tiangolo/fastapi/pull/2733) by [hukkin](https://github.com/hukkin).
* ⬆️ Bump Uvicorn max range to 0.15.0. PR [3345](https://github.com/tiangolo/fastapi/pull/3345) by [Kludex](https://github.com/Kludex).

Docs

* 📝 Update GraphQL docs, recommend Strawberry. PR [3981](https://github.com/tiangolo/fastapi/pull/3981) by [tiangolo](https://github.com/tiangolo).
* 📝 Re-write and extend Deployment guide: Concepts, Uvicorn, Gunicorn, Docker, Containers, Kubernetes. PR [3974](https://github.com/tiangolo/fastapi/pull/3974) by [tiangolo](https://github.com/tiangolo).
* 📝 Upgrade HTTPS guide with more explanations and diagrams. PR [3950](https://github.com/tiangolo/fastapi/pull/3950) by [tiangolo](https://github.com/tiangolo).

Translations

* 🌐 Add Turkish translation for `docs/features.md`. PR [1950](https://github.com/tiangolo/fastapi/pull/1950) by [ycd](https://github.com/ycd).
* 🌐 Add Turkish translation for `docs/benchmarks.md`. PR [2729](https://github.com/tiangolo/fastapi/pull/2729) by [Telomeraz](https://github.com/Telomeraz).
* 🌐 Add Turkish translation for `docs/index.md`. PR [1908](https://github.com/tiangolo/fastapi/pull/1908) by [ycd](https://github.com/ycd).
* 🌐 Add French translation for `docs/tutorial/body.md`. PR [3671](https://github.com/tiangolo/fastapi/pull/3671) by [Smlep](https://github.com/Smlep).
* 🌐 Add French translation for `deployment/docker.md`. PR [3694](https://github.com/tiangolo/fastapi/pull/3694) by [rjNemo](https://github.com/rjNemo).
* 🌐 Add Portuguese translation for `docs/tutorial/path-params.md`. PR [3664](https://github.com/tiangolo/fastapi/pull/3664) by [FelipeSilva93](https://github.com/FelipeSilva93).
* 🌐 Add Portuguese translation for `docs/deployment/https.md`. PR [3754](https://github.com/tiangolo/fastapi/pull/3754) by [lsglucas](https://github.com/lsglucas).
* 🌐 Add German translation for `docs/features.md`. PR [3699](https://github.com/tiangolo/fastapi/pull/3699) by [mawassk](https://github.com/mawassk).

Internal

* ✨ Update GitHub Action: notify-translations, to avoid a race conditions. PR [3989](https://github.com/tiangolo/fastapi/pull/3989) by [tiangolo](https://github.com/tiangolo).
* ⬆️ Upgrade development `autoflake`, supporting multi-line imports. PR [3988](https://github.com/tiangolo/fastapi/pull/3988) by [tiangolo](https://github.com/tiangolo).
* ⬆️ Increase dependency ranges for tests and docs: pytest-cov, pytest-asyncio, black, httpx, sqlalchemy, databases, mkdocs-markdownextradata-plugin. PR [3987](https://github.com/tiangolo/fastapi/pull/3987) by [tiangolo](https://github.com/tiangolo).
* 👥 Update FastAPI People. PR [3986](https://github.com/tiangolo/fastapi/pull/3986) by [github-actions[bot]](https://github.com/apps/github-actions).
* 💚 Fix badges in README and main page. PR [3979](https://github.com/tiangolo/fastapi/pull/3979) by [ghandic](https://github.com/ghandic).
* ⬆ Upgrade internal testing dependencies: mypy to version 0.910, add newly needed type packages. PR [3350](https://github.com/tiangolo/fastapi/pull/3350) by [ArcLightSlavik](https://github.com/ArcLightSlavik).
* ✨ Add Deepset Sponsorship. PR [3976](https://github.com/tiangolo/fastapi/pull/3976) by [tiangolo](https://github.com/tiangolo).
* 🎨 Tweak CSS styles for shell animations. PR [3888](https://github.com/tiangolo/fastapi/pull/3888) by [tiangolo](https://github.com/tiangolo).
* 🔧 Add new Sponsor Calmcode.io. PR [3777](https://github.com/tiangolo/fastapi/pull/3777) by [tiangolo](https://github.com/tiangolo).

0.68.1

* ✨ Add support for `read_with_orm_mode`, to support [SQLModel](https://sqlmodel.tiangolo.com/) relationship attributes. PR [#3757](https://github.com/tiangolo/fastapi/pull/3757) by [tiangolo](https://github.com/tiangolo).

Translations

* 🌐 Add Portuguese translation of `docs/fastapi-people.md`. PR [3461](https://github.com/tiangolo/fastapi/pull/3461) by [ComicShrimp](https://github.com/ComicShrimp).
* 🌐 Add Chinese translation for `docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md`. PR [3492](https://github.com/tiangolo/fastapi/pull/3492) by [jaystone776](https://github.com/jaystone776).
* 🔧 Add new Translation tracking issues for German and Indonesian. PR [3718](https://github.com/tiangolo/fastapi/pull/3718) by [tiangolo](https://github.com/tiangolo).
* 🌐 Add Chinese translation for `docs/tutorial/dependencies/sub-dependencies.md`. PR [3491](https://github.com/tiangolo/fastapi/pull/3491) by [jaystone776](https://github.com/jaystone776).
* 🌐 Add Portuguese translation for `docs/advanced/index.md`. PR [3460](https://github.com/tiangolo/fastapi/pull/3460) by [ComicShrimp](https://github.com/ComicShrimp).
* 🌐 Portuguese translation of `docs/async.md`. PR [1330](https://github.com/tiangolo/fastapi/pull/1330) by [Serrones](https://github.com/Serrones).
* 🌐 Add French translation for `docs/async.md`. PR [3416](https://github.com/tiangolo/fastapi/pull/3416) by [Smlep](https://github.com/Smlep).

Internal

* ✨ Add GitHub Action: Notify Translations. PR [3715](https://github.com/tiangolo/fastapi/pull/3715) by [tiangolo](

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant