From 839a5d0a7898e612d299bae72db2cd30045600b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sun, 21 Sep 2025 15:51:44 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A1=20Add=20comment=20in=20AsyncExitSt?= =?UTF-8?q?ackMiddleware?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/middleware/asyncexitstack.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fastapi/middleware/asyncexitstack.py b/fastapi/middleware/asyncexitstack.py index 6723638f1..4ce3f5a62 100644 --- a/fastapi/middleware/asyncexitstack.py +++ b/fastapi/middleware/asyncexitstack.py @@ -3,6 +3,8 @@ from contextlib import AsyncExitStack from starlette.types import ASGIApp, Receive, Scope, Send +# Used mainly to close files after the request is done, dependencies are closed +# in their own AsyncExitStack class AsyncExitStackMiddleware: def __init__( self, app: ASGIApp, context_name: str = "fastapi_middleware_astack"