fastapi/docs/en
JP-Ellis 44ff653664
docs: add caveat about ContextVar in dependencies
As discovered and discussed in #13382, ContextVars set in a
_synchronous_ dependency is not available to the rest of the request due
to the way FastAPI handles that dependency.

The documentation did not make any mention of this, and it was only
after I asked that I discovered this was intended behaviour. So I am
updating the docs to make this clear to others.

Ref: #13382
Signed-off-by: JP-Ellis <josh@jpellis.me>
2025-07-16 10:08:17 +10:00
..
data 👥 Update FastAPI People - Experts (#13889) 2025-07-12 19:32:26 +00:00
docs docs: add caveat about ContextVar in dependencies 2025-07-16 10:08:17 +10:00
overrides 🔧 Update sponsors: remove Porter (#13783) 2025-06-10 18:52:33 +02:00
mkdocs.insiders.yml 🔧 Update configs for MkDocs for languages and social cards (#12016) 2024-08-14 09:33:27 -05:00
mkdocs.maybe-insiders.yml 🔨 Enable linenums in MkDocs Material during local live development to simplify highlighting code (#9769) 2023-06-30 18:23:02 +02:00
mkdocs.no-insiders.yml Add Material for MkDocs Insiders features and cards (#9748) 2023-06-26 16:05:43 +02:00
mkdocs.yml 🔧 Remove Google Analytics (#13727) 2025-05-22 09:18:52 +00:00