]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commit
✨ Add support for dependencies with scopes, support `scope="request"` for dependencie...
authorSebastián Ramírez <tiangolo@gmail.com>
Mon, 3 Nov 2025 10:12:49 +0000 (11:12 +0100)
committerGitHub <noreply@github.com>
Mon, 3 Nov 2025 10:12:49 +0000 (11:12 +0100)
commitac438b99342c859ae0e10f7064021125bd247bf5
treeb1a416511afde16c2dc525cc92bbeb32d313f9c4
parent425a4c5bb1d1a8e00007e82e5188fc4d30585767
✨ Add support for dependencies with scopes, support `scope="request"` for dependencies with `yield` that exit before the response is sent (#14262)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
14 files changed:
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
docs_src/dependencies/tutorial008e.py [new file with mode: 0644]
docs_src/dependencies/tutorial008e_an.py [new file with mode: 0644]
docs_src/dependencies/tutorial008e_an_py39.py [new file with mode: 0644]
fastapi/dependencies/models.py
fastapi/dependencies/utils.py
fastapi/exceptions.py
fastapi/param_functions.py
fastapi/params.py
fastapi/routing.py
fastapi/types.py
tests/test_dependency_yield_scope.py [new file with mode: 0644]
tests/test_dependency_yield_scope_websockets.py [new file with mode: 0644]
tests/test_tutorial/test_dependencies/test_tutorial008e.py [new file with mode: 0644]