fastapi/docs_src/dependencies
Sebastián Ramírez a4aa79e0b4
Add support for raising exceptions (including `HTTPException`) in dependencies with `yield` in the exit code, do not support them in background tasks (#10831)
* ♻️ Refactor dependency AsyncExitStack logic, exit dependencies after creating the response, before sending it

*  Update tests for dependencies exit, check they are finished before the response is sent

* 🔥 Remove ExitAsyncStackMiddleware as it's no longer needed

* 📝 Update docs for dependencies with yield

* 📝 Update release notes

* 📝 Add source examples for new dependencies with yield raising

*  Add tests for new dependencies raising after yield

* 📝 Update release notes
2023-12-25 18:57:35 +01:00
..
tutorial001.py 📝 Add docs recommending `Union` over `Optional` and migrate source examples (#4908) 2022-05-14 06:59:59 -05:00
tutorial001_02_an.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial001_02_an_py39.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial001_02_an_py310.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial001_an.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial001_an_py39.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial001_an_py310.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial001_py310.py Add docs and tests for Python 3.9 and Python 3.10 (#3712) 2022-01-07 15:11:31 +01:00
tutorial002.py 📝 Add docs recommending `Union` over `Optional` and migrate source examples (#4908) 2022-05-14 06:59:59 -05:00
tutorial002_an.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial002_an_py39.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial002_an_py310.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial002_py310.py Add docs and tests for Python 3.9 and Python 3.10 (#3712) 2022-01-07 15:11:31 +01:00
tutorial003.py 📝 Add docs recommending `Union` over `Optional` and migrate source examples (#4908) 2022-05-14 06:59:59 -05:00
tutorial003_an.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial003_an_py39.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial003_an_py310.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial003_py310.py Add docs and tests for Python 3.9 and Python 3.10 (#3712) 2022-01-07 15:11:31 +01:00
tutorial004.py 📝 Add docs recommending `Union` over `Optional` and migrate source examples (#4908) 2022-05-14 06:59:59 -05:00
tutorial004_an.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial004_an_py39.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial004_an_py310.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial004_py310.py Add docs and tests for Python 3.9 and Python 3.10 (#3712) 2022-01-07 15:11:31 +01:00
tutorial005.py 📝 Add docs recommending `Union` over `Optional` and migrate source examples (#4908) 2022-05-14 06:59:59 -05:00
tutorial005_an.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial005_an_py39.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial005_an_py310.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial005_py310.py Add support for not needing `...` as default value in required Query(), Path(), Header(), etc. (#4906) 2022-05-13 18:38:22 -05:00
tutorial006.py Add support for not needing `...` as default value in required Query(), Path(), Header(), etc. (#4906) 2022-05-13 18:38:22 -05:00
tutorial006_an.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial006_an_py39.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial007.py Add support for docs translations (#1168) 2020-03-26 20:09:53 +01:00
tutorial008.py Add support for docs translations (#1168) 2020-03-26 20:09:53 +01:00
tutorial008_an.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial008_an_py39.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial008b.py Add support for raising exceptions (including `HTTPException`) in dependencies with `yield` in the exit code, do not support them in background tasks (#10831) 2023-12-25 18:57:35 +01:00
tutorial008b_an.py Add support for raising exceptions (including `HTTPException`) in dependencies with `yield` in the exit code, do not support them in background tasks (#10831) 2023-12-25 18:57:35 +01:00
tutorial008b_an_py39.py Add support for raising exceptions (including `HTTPException`) in dependencies with `yield` in the exit code, do not support them in background tasks (#10831) 2023-12-25 18:57:35 +01:00
tutorial009.py Add support for docs translations (#1168) 2020-03-26 20:09:53 +01:00
tutorial010.py Add support for docs translations (#1168) 2020-03-26 20:09:53 +01:00
tutorial011.py Add support for docs translations (#1168) 2020-03-26 20:09:53 +01:00
tutorial011_an.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial011_an_py39.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial012.py Add support for not needing `...` as default value in required Query(), Path(), Header(), etc. (#4906) 2022-05-13 18:38:22 -05:00
tutorial012_an.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00
tutorial012_an_py39.py 📝 Update all docs to use `Annotated` as the main recommendation, with new examples and tests (#9268) 2023-03-18 13:29:59 +01:00