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.93.0 #151

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

Conversation

pyup-bot
Copy link
Collaborator

@pyup-bot pyup-bot commented Mar 7, 2023

This PR pins fastapi to the latest release 0.93.0.

Changelog

0.93.0

Features

* ✨ Add support for `lifespan` async context managers (superseding `startup` and `shutdown` events). Initial PR [2944](https://github.com/tiangolo/fastapi/pull/2944) by [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 = {}


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)


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

Translations

* 🌐 Tamil translations - initial setup. PR [5564](https://github.com/tiangolo/fastapi/pull/5564) by [gusty1g](https://github.com/gusty1g).
* 🌐 Add French translation for `docs/fr/docs/advanced/path-operation-advanced-configuration.md`. PR [9221](https://github.com/tiangolo/fastapi/pull/9221) by [axel584](https://github.com/axel584).
* 🌐 Add French translation for `docs/tutorial/debugging.md`. PR [9175](https://github.com/tiangolo/fastapi/pull/9175) by [frabc](https://github.com/frabc).
* 🌐 Initiate Armenian translation setup. PR [5844](https://github.com/tiangolo/fastapi/pull/5844) by [har8](https://github.com/har8).
* 🌐 Add French translation for `deployment/manually.md`. PR [3693](https://github.com/tiangolo/fastapi/pull/3693) by [rjNemo](https://github.com/rjNemo).

Internal

* 👷 Update translation bot messages. PR [9206](https://github.com/tiangolo/fastapi/pull/9206) by [tiangolo](https://github.com/tiangolo).
* 👷 Update translations bot to use Discussions, and notify when a PR is done. PR [9183](https://github.com/tiangolo/fastapi/pull/9183) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update sponsors-badges. PR [9182](https://github.com/tiangolo/fastapi/pull/9182) by [tiangolo](https://github.com/tiangolo).
* 👥 Update FastAPI People. PR [9181](https://github.com/tiangolo/fastapi/pull/9181) by [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 [9171](https://github.com/tiangolo/fastapi/pull/9171) by [tiangolo](https://github.com/tiangolo).
* 💚 Fix/workaround GitHub Actions in Docker with git for FastAPI People. PR [9169](https://github.com/tiangolo/fastapi/pull/9169) by [tiangolo](https://github.com/tiangolo).
* ♻️ Refactor FastAPI Experts to use only discussions now that questions are migrated. PR [9165](https://github.com/tiangolo/fastapi/pull/9165) by [tiangolo](https://github.com/tiangolo).
* ⬆️ Upgrade analytics. PR [6025](https://github.com/tiangolo/fastapi/pull/6025) by [tiangolo](https://github.com/tiangolo).
* ⬆️ Upgrade and re-enable installing Typer-CLI. PR [6008](https://github.com/tiangolo/fastapi/pull/6008) by [tiangolo](https://github.com/tiangolo).

0.92.0

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

Upgrades

* ⬆️ Upgrade Starlette to 0.25.0. PR [5996](https://github.com/tiangolo/fastapi/pull/5996) by [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.

0.91.0

Upgrades

* ⬆️ Upgrade Starlette version to `0.24.0` and refactor internals for compatibility. PR [5985](https://github.com/tiangolo/fastapi/pull/5985) by [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 [adriangb](https://github.com/adriangb)! Starlette PR [#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.

0.90.1

Upgrades

* ⬆️ Upgrade Starlette range to allow 0.23.1. PR [5980](https://github.com/tiangolo/fastapi/pull/5980) by [tiangolo](https://github.com/tiangolo).

Docs

* ✏ Tweak wording to clarify `docs/en/docs/project-generation.md`. PR [5930](https://github.com/tiangolo/fastapi/pull/5930) by [chandra-deb](https://github.com/chandra-deb).
* ✏ Update Pydantic GitHub URLs. PR [5952](https://github.com/tiangolo/fastapi/pull/5952) by [yezz123](https://github.com/yezz123).
* 📝 Add opinion from Cisco. PR [5981](https://github.com/tiangolo/fastapi/pull/5981) by [tiangolo](https://github.com/tiangolo).

Translations

* 🌐 Add Russian translation for `docs/ru/docs/tutorial/cookie-params.md`. PR [5890](https://github.com/tiangolo/fastapi/pull/5890) by [bnzone](https://github.com/bnzone).

Internal

* ✏ Update `zip-docs.sh` internal script, remove extra space. PR [5931](https://github.com/tiangolo/fastapi/pull/5931) by [JuanPerdomo00](https://github.com/JuanPerdomo00).

0.90.0

Upgrades

* ⬆️ Bump Starlette from 0.22.0 to 0.23.0. Initial PR [5739](https://github.com/tiangolo/fastapi/pull/5739) by [Kludex](https://github.com/Kludex).

Docs

* 📝 Add article "Tortoise ORM / FastAPI 整合快速筆記" to External Links. PR [5496](https://github.com/tiangolo/fastapi/pull/5496) by [Leon0824](https://github.com/Leon0824).
* 👥 Update FastAPI People. PR [5954](https://github.com/tiangolo/fastapi/pull/5954) by [github-actions[bot]](https://github.com/apps/github-actions).
* 📝 Micro-tweak help docs. PR [5960](https://github.com/tiangolo/fastapi/pull/5960) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update new issue chooser to direct to GitHub Discussions. PR [5948](https://github.com/tiangolo/fastapi/pull/5948) by [tiangolo](https://github.com/tiangolo).
* 📝 Recommend GitHub Discussions for questions. PR [5944](https://github.com/tiangolo/fastapi/pull/5944) by [tiangolo](https://github.com/tiangolo).

Translations

* 🌐 Add Russian translation for `docs/ru/docs/tutorial/body-fields.md`. PR [5898](https://github.com/tiangolo/fastapi/pull/5898) by [simatheone](https://github.com/simatheone).
* 🌐 Add Russian translation for `docs/ru/docs/help-fastapi.md`. PR [5970](https://github.com/tiangolo/fastapi/pull/5970) by [tiangolo](https://github.com/tiangolo).
* 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/static-files.md`. PR [5858](https://github.com/tiangolo/fastapi/pull/5858) by [batlopes](https://github.com/batlopes).
* 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/encoder.md`. PR [5525](https://github.com/tiangolo/fastapi/pull/5525) by [felipebpl](https://github.com/felipebpl).
* 🌐 Add Russian translation for `docs/ru/docs/contributing.md`. PR [5870](https://github.com/tiangolo/fastapi/pull/5870) by [Xewus](https://github.com/Xewus).

Internal

* ⬆️ Upgrade Ubuntu version for docs workflow. PR [5971](https://github.com/tiangolo/fastapi/pull/5971) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update sponsors badges. PR [5943](https://github.com/tiangolo/fastapi/pull/5943) by [tiangolo](https://github.com/tiangolo).
* ✨ Compute FastAPI Experts including GitHub Discussions. PR [5941](https://github.com/tiangolo/fastapi/pull/5941) by [tiangolo](https://github.com/tiangolo).
* ⬆️ Upgrade isort and update pre-commit. PR [5940](https://github.com/tiangolo/fastapi/pull/5940) by [tiangolo](https://github.com/tiangolo).
* 🔧 Add template for questions in Discussions. PR [5920](https://github.com/tiangolo/fastapi/pull/5920) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update Sponsor Budget Insight to Powens. PR [5916](https://github.com/tiangolo/fastapi/pull/5916) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update GitHub Sponsors badge data. PR [5915](https://github.com/tiangolo/fastapi/pull/5915) by [tiangolo](https://github.com/tiangolo).

0.89.1

Fixes

* 🐛 Ignore Response classes on return annotation. PR [5855](https://github.com/tiangolo/fastapi/pull/5855) by [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 [5873](https://github.com/tiangolo/fastapi/pull/5873) by [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 [5784](https://github.com/tiangolo/fastapi/pull/5784) by [rafrasenberg](https://github.com/rafrasenberg).

Translations

* 🌐 Add Turkish translation for `docs/tr/docs/tutorial/first_steps.md`. PR [5691](https://github.com/tiangolo/fastapi/pull/5691) by [Kadermiyanyedi](https://github.com/Kadermiyanyedi).

0.89.0

Features

* ✨ Add support for function return type annotations to declare the `response_model`. Initial PR [1436](https://github.com/tiangolo/fastapi/pull/1436) by [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


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 [5712](https://github.com/tiangolo/fastapi/pull/5712) by [Xhy-5000](https://github.com/Xhy-5000).
* ✏ Fix typo in `docs/en/docs/async.md`. PR [5785](https://github.com/tiangolo/fastapi/pull/5785) by [Kingdageek](https://github.com/Kingdageek).
* ✏ Fix typo in `docs/en/docs/deployment/concepts.md`. PR [5824](https://github.com/tiangolo/fastapi/pull/5824) by [kelbyfaessler](https://github.com/kelbyfaessler).

Translations

* 🌐 Add Russian translation for `docs/ru/docs/fastapi-people.md`. PR [5577](https://github.com/tiangolo/fastapi/pull/5577) by [Xewus](https://github.com/Xewus).
* 🌐 Fix typo in Chinese translation for `docs/zh/docs/benchmarks.md`. PR [4269](https://github.com/tiangolo/fastapi/pull/4269) by [15027668g](https://github.com/15027668g).
* 🌐 Add Korean translation for `docs/tutorial/cors.md`. PR [3764](https://github.com/tiangolo/fastapi/pull/3764) by [NinaHwang](https://github.com/NinaHwang).

Internal

* ⬆ Update coverage[toml] requirement from <7.0,>=6.5.0 to >=6.5.0,<8.0. PR [5801](https://github.com/tiangolo/fastapi/pull/5801) by [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 [5795](https://github.com/tiangolo/fastapi/pull/5795) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump dawidd6/action-download-artifact from 2.24.2 to 2.24.3. PR [5842](https://github.com/tiangolo/fastapi/pull/5842) by [dependabot[bot]](https://github.com/apps/dependabot).
* 👥 Update FastAPI People. PR [5825](https://github.com/tiangolo/fastapi/pull/5825) by [github-actions[bot]](https://github.com/apps/github-actions).
* ⬆ Bump types-ujson from 5.5.0 to 5.6.0.0. PR [5735](https://github.com/tiangolo/fastapi/pull/5735) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump pypa/gh-action-pypi-publish from 1.5.2 to 1.6.4. PR [5750](https://github.com/tiangolo/fastapi/pull/5750) by [dependabot[bot]](https://github.com/apps/dependabot).
* 👷 Add GitHub Action gate/check. PR [5492](https://github.com/tiangolo/fastapi/pull/5492) by [webknjaz](https://github.com/webknjaz).
* 🔧 Update sponsors, add Svix. PR [5848](https://github.com/tiangolo/fastapi/pull/5848) by [tiangolo](https://github.com/tiangolo).
* 🔧 Remove Doist sponsor. PR [5847](https://github.com/tiangolo/fastapi/pull/5847) by [tiangolo](https://github.com/tiangolo).
* ⬆ Update sqlalchemy requirement from <=1.4.41,>=1.3.18 to >=1.3.18,<1.4.43. PR [5540](https://github.com/tiangolo/fastapi/pull/5540) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump nwtgck/actions-netlify from 1.2.4 to 2.0.0. PR [5757](https://github.com/tiangolo/fastapi/pull/5757) by [dependabot[bot]](https://github.com/apps/dependabot).
* 👷 Refactor CI artifact upload/download for docs previews. PR [5793](https://github.com/tiangolo/fastapi/pull/5793) by [tiangolo](https://github.com/tiangolo).
* ⬆ Bump pypa/gh-action-pypi-publish from 1.5.1 to 1.5.2. PR [5714](https://github.com/tiangolo/fastapi/pull/5714) by [dependabot[bot]](https://github.com/apps/dependabot).
* 👥 Update FastAPI People. PR [5722](https://github.com/tiangolo/fastapi/pull/5722) by [github-actions[bot]](https://github.com/apps/github-actions).
* 🔧 Update sponsors, disable course bundle. PR [5713](https://github.com/tiangolo/fastapi/pull/5713) by [tiangolo](https://github.com/tiangolo).
* ⬆ Update typer[all] requirement from <0.7.0,>=0.6.1 to >=0.6.1,<0.8.0. PR [5639](https://github.com/tiangolo/fastapi/pull/5639) by [dependabot[bot]](https://github.com/apps/dependabot).

0.88.0

Upgrades

* ⬆ Bump Starlette to version `0.22.0` to fix bad encoding for query parameters in new `TestClient`. PR [5659](https://github.com/tiangolo/fastapi/pull/5659) by [azogue](https://github.com/azogue).

Docs

* ✏️ Fix typo in docs for `docs/en/docs/advanced/middleware.md`. PR [5376](https://github.com/tiangolo/fastapi/pull/5376) by [rifatrakib](https://github.com/rifatrakib).

Translations

* 🌐 Add Portuguese translation for `docs/pt/docs/deployment/docker.md`. PR [5663](https://github.com/tiangolo/fastapi/pull/5663) by [ayr-ton](https://github.com/ayr-ton).

Internal

* 👷 Tweak build-docs to improve CI performance. PR [5699](https://github.com/tiangolo/fastapi/pull/5699) by [tiangolo](https://github.com/tiangolo).
* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [5566](https://github.com/tiangolo/fastapi/pull/5566) by [pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Upgrade Ruff. PR [5698](https://github.com/tiangolo/fastapi/pull/5698) by [tiangolo](https://github.com/tiangolo).
* 👷 Remove pip cache for Smokeshow as it depends on a requirements.txt. PR [5700](https://github.com/tiangolo/fastapi/pull/5700) by [tiangolo](https://github.com/tiangolo).
* 💚 Fix pip cache for Smokeshow. PR [5697](https://github.com/tiangolo/fastapi/pull/5697) by [tiangolo](https://github.com/tiangolo).
* 👷 Fix and tweak CI cache handling. PR [5696](https://github.com/tiangolo/fastapi/pull/5696) by [tiangolo](https://github.com/tiangolo).
* 👷 Update `setup-python` action in tests to use new caching feature. PR [5680](https://github.com/tiangolo/fastapi/pull/5680) by [madkinsz](https://github.com/madkinsz).
* ⬆ Bump black from 22.8.0 to 22.10.0. PR [5569](https://github.com/tiangolo/fastapi/pull/5569) by [dependabot[bot]](https://github.com/apps/dependabot).

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 [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 [5634](https://github.com/tiangolo/fastapi/pull/5634) by [tiangolo](https://github.com/tiangolo).
* ✨ Re-export Starlette's `WebSocketException` and add it to docs. PR [5629](https://github.com/tiangolo/fastapi/pull/5629) by [tiangolo](https://github.com/tiangolo).
* 📝 Update references to Requests for tests to HTTPX, and add HTTPX to extras. PR [5628](https://github.com/tiangolo/fastapi/pull/5628) by [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 [#5471](https://github.com/tiangolo/fastapi/pull/5471) by [pawelrubin](https://github.com/pawelrubin).

Docs

* ✏️ Tweak Help FastAPI from PR review after merging. PR [5633](https://github.com/tiangolo/fastapi/pull/5633) by [tiangolo](https://github.com/tiangolo).
* ✏️  Clarify docs on CORS. PR [5627](https://github.com/tiangolo/fastapi/pull/5627) by [paxcodes](https://github.com/paxcodes).
* 📝 Update Help FastAPI: Help Maintain FastAPI. PR [5632](https://github.com/tiangolo/fastapi/pull/5632) by [tiangolo](https://github.com/tiangolo).

Translations

* 🌐 Fix highlight lines for Japanese translation for `docs/tutorial/query-params.md`. PR [2969](https://github.com/tiangolo/fastapi/pull/2969) by [ftnext](https://github.com/ftnext).
* 🌐 Add French translation for `docs/fr/docs/advanced/additional-status-code.md`. PR [5477](https://github.com/tiangolo/fastapi/pull/5477) by [axel584](https://github.com/axel584).
* 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/request-forms-and-files.md`. PR [5579](https://github.com/tiangolo/fastapi/pull/5579) by [batlopes](https://github.com/batlopes).
* 🌐 Add Japanese translation for `docs/ja/docs/advanced/websockets.md`. PR [4983](https://github.com/tiangolo/fastapi/pull/4983) by [xryuseix](https://github.com/xryuseix).

Internal

* ✨ Use Ruff for linting. PR [5630](https://github.com/tiangolo/fastapi/pull/5630) by [tiangolo](https://github.com/tiangolo).
* 🛠 Add Arabic issue number to Notify Translations GitHub Action. PR [5610](https://github.com/tiangolo/fastapi/pull/5610) by [tiangolo](https://github.com/tiangolo).
* ⬆ Bump dawidd6/action-download-artifact from 2.24.1 to 2.24.2. PR [5609](https://github.com/tiangolo/fastapi/pull/5609) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump dawidd6/action-download-artifact from 2.24.0 to 2.24.1. PR [5603](https://github.com/tiangolo/fastapi/pull/5603) by [dependabot[bot]](https://github.com/apps/dependabot).
* 📝 Update coverage badge to use Samuel Colvin's Smokeshow. PR [5585](https://github.com/tiangolo/fastapi/pull/5585) by [tiangolo](https://github.com/tiangolo).

0.86.0

Features

* ⬆ Add Python 3.11 to the officially supported versions. PR [5587](https://github.com/tiangolo/fastapi/pull/5587) by [tiangolo](https://github.com/tiangolo).
* ✅ Enable tests for Python 3.11. PR [4881](https://github.com/tiangolo/fastapi/pull/4881) by [tiangolo](https://github.com/tiangolo).

Fixes

* 🐛 Close FormData (uploaded files) after the request is done. PR [5465](https://github.com/tiangolo/fastapi/pull/5465) by [adriangb](https://github.com/adriangb).

Docs

* ✏ Fix typo in `docs/en/docs/tutorial/security/oauth2-jwt.md`. PR [5584](https://github.com/tiangolo/fastapi/pull/5584) by [vivekashok1221](https://github.com/vivekashok1221).

Translations

* 🌐 Update wording in Chinese translation for `docs/zh/docs/python-types.md`. PR [5416](https://github.com/tiangolo/fastapi/pull/5416) by [supercaizehua](https://github.com/supercaizehua).
* 🌐 Add Russian translation for `docs/ru/docs/deployment/index.md`. PR [5336](https://github.com/tiangolo/fastapi/pull/5336) by [Xewus](https://github.com/Xewus).
* 🌐 Update Chinese translation for `docs/tutorial/security/oauth2-jwt.md`. PR [3846](https://github.com/tiangolo/fastapi/pull/3846) by [jaystone776](https://github.com/jaystone776).

Internal

* 👷 Update FastAPI People to exclude bots: pre-commit-ci, dependabot. PR [5586](https://github.com/tiangolo/fastapi/pull/5586) by [tiangolo](https://github.com/tiangolo).
* 🎨 Format OpenAPI JSON in `test_starlette_exception.py`. PR [5379](https://github.com/tiangolo/fastapi/pull/5379) by [iudeen](https://github.com/iudeen).
* 👷 Switch from Codecov to Smokeshow plus pytest-cov to pure coverage for internal tests. PR [5583](https://github.com/tiangolo/fastapi/pull/5583) by [tiangolo](https://github.com/tiangolo).
* 👥 Update FastAPI People. PR [5571](https://github.com/tiangolo/fastapi/pull/5571) by [github-actions[bot]](https://github.com/apps/github-actions).

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 [5432](https://github.com/tiangolo/fastapi/pull/5432) by [pamelafox](https://github.com/pamelafox).
* ✏ Fix broken link in `alternatives.md`. PR [5455](https://github.com/tiangolo/fastapi/pull/5455) by [su-shubham](https://github.com/su-shubham).
* ✏ Fix typo in docs about contributing, for compatibility with `pip` in Zsh. PR [5523](https://github.com/tiangolo/fastapi/pull/5523) by [zhangbo2012](https://github.com/zhangbo2012).
* 📝 Fix typo in docs with examples for Python 3.10 instead of 3.9. PR [5545](https://github.com/tiangolo/fastapi/pull/5545) by [feliciss](https://github.com/feliciss).

Translations

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

Internal

* ⬆ Bump internal dependency mypy from 0.971 to 0.982. PR [5541](https://github.com/tiangolo/fastapi/pull/5541) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump nwtgck/actions-netlify from 1.2.3 to 1.2.4. PR [5507](https://github.com/tiangolo/fastapi/pull/5507) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump internal dependency types-ujson from 5.4.0 to 5.5.0. PR [5537](https://github.com/tiangolo/fastapi/pull/5537) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump dawidd6/action-download-artifact from 2.23.0 to 2.24.0. PR [5508](https://github.com/tiangolo/fastapi/pull/5508) by [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 [5539](https://github.com/tiangolo/fastapi/pull/5539) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [5536](https://github.com/tiangolo/fastapi/pull/5536) by [pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* 🐛 Fix internal Trio test warnings. PR [5547](https://github.com/tiangolo/fastapi/pull/5547) by [samuelcolvin](https://github.com/samuelcolvin).
* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [5408](https://github.com/tiangolo/fastapi/pull/5408) by [pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Upgrade Typer to include Rich in scripts for docs. PR [5502](https://github.com/tiangolo/fastapi/pull/5502) by [tiangolo](https://github.com/tiangolo).
* 🐛 Fix calling `mkdocs` for languages as a subprocess to fix/enable MkDocs Material search plugin. PR [5501](https://github.com/tiangolo/fastapi/pull/5501) by [tiangolo](https://github.com/tiangolo).

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.co

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