From 0192eab5572747f46979729eedaef749992f425d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Wed, 9 Oct 2019 13:13:04 -0500 Subject: [PATCH] :memo: Update release notes --- docs/release-notes.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/release-notes.md b/docs/release-notes.md index 15de42d0d..daeb5031b 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,5 +1,16 @@ ## Latest changes +* Add dependencies with `yield`, a.k.a. exit steps, context managers, cleanup, teardown, ... + * This allows adding extra code after a dependency is done. It can be used, for example, to close database connections. + * Dependencies with `yield` can be normal or `async`, **FastAPI** will run normal dependencies in a threadpool. + * They can be combined with normal dependencies. + * It's possible to have arbitrary trees/levels of dependencies with `yield` and exit steps are handled in the correct order automatically. + * It works by default in Python 3.7 or above. For Python 3.6, it requires the extra backport dependencies: + * `async-exit-stack` + * `async-generator` + * New docs at [Dependencies with `yield`](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/). + * Updated database docs [SQL (Relational) Databases: Main **FastAPI** app](https://fastapi.tiangolo.com/tutorial/sql-databases/#main-fastapi-app). + * PR [#595](https://github.com/tiangolo/fastapi/pull/595). * Fix `sitemap.xml` in website. PR [#598](https://github.com/tiangolo/fastapi/pull/598) by [@samuelcolvin](https://github.com/samuelcolvin). ## 0.41.0