From 7e0e16fa3669d83a9992ff5aee669135ebb41fc1 Mon Sep 17 00:00:00 2001 From: Jacob McDonald <48448372+jacob-indigo@users.noreply.github.com> Date: Fri, 12 Jan 2024 09:03:25 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20warning=20about=20lifespan?= =?UTF-8?q?=20functions=20and=20backwards=20compatibility=20with=20events?= =?UTF-8?q?=20(#10734)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com> --- docs/en/docs/advanced/events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/docs/advanced/events.md b/docs/en/docs/advanced/events.md index 6df1411d1..ca9d86ae4 100644 --- a/docs/en/docs/advanced/events.md +++ b/docs/en/docs/advanced/events.md @@ -92,7 +92,7 @@ The `lifespan` parameter of the `FastAPI` app takes an **async context manager** ## Alternative Events (deprecated) !!! warning - The recommended way to handle the *startup* and *shutdown* is using the `lifespan` parameter of the `FastAPI` app as described above. + The recommended way to handle the *startup* and *shutdown* is using the `lifespan` parameter of the `FastAPI` app as described above. If you provide a `lifespan` parameter, `startup` and `shutdown` event handlers will no longer be called. It's all `lifespan` or all events, not both. You can probably skip this part.