]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
📝 Add warning about lifespan functions and backwards compatibility with events (...
authorJacob McDonald <48448372+jacob-indigo@users.noreply.github.com>
Fri, 12 Jan 2024 14:03:25 +0000 (09:03 -0500)
committerGitHub <noreply@github.com>
Fri, 12 Jan 2024 14:03:25 +0000 (15:03 +0100)
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
docs/en/docs/advanced/events.md

index 6df1411d1f31790fe4bb72b91313910692abb90d..ca9d86ae41e9919c440fdeac2e4ec20d02ca7bb3 100644 (file)
@@ -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.