Jump to conversation
Unresolved conversations (2)
@adriangb adriangb Jun 7, 2023
We can get rid of all of this now because the structure is `Starlette -> ServerErrorMiddleware -> User middleware -> routing -> HTTPException handling -> AsyncExitStack -> Dependencies -> Endpoint` (in other words, Starlette moved what used to be ExceptionMiddleware to be inside of routing)
Outdated
fastapi/applications.py
@adriangb adriangb Jun 7, 2023
I'm not 100% sure why this is changing, I think it's worth looking into a bit more, but I did do a test with a real client (httpx) and a background task that sleeps for 10s before completing and it works correctly (the client gets the response immediately, the background task finishes 10s later)
Outdated
tests/test_dependency_contextmanager.py
adriangb antont
tiangolo
Resolved conversations (1)
@adriangb adriangb Jun 7, 2023
I don't think this needs to be (or should be) a public class, in particular, this PR will be a "breaking change" for anyone using it directly, but I'm leaving it as it was to minimize change.
Outdated
fastapi/middleware/asyncexitstack.py
tiangolo