starlette
starlette copied to clipboard
TestClient handle exceptions thrown from lifespan before shutdown event
Could you please edit the title/description to specify that this only affects TestClient? A bit more context in the description as to what you're trying to achieve would help as well.
Could you please edit the title/description to specify that this only affects TestClient? A bit more context in the description as to what you're trying to achieve would help as well.
I'm trying to make it so that if an exception is thrown into a taskgroup spanning the lifespan_context the exception is thrown out of the TestClient context as quickly as possible.
It does this by cancelling any concurrent requests of the TestClient and preventing any new requests until the TestClient is closed
@graingert Are you still interested in this, or can I close it?
We still don't know what we are going to do with the TestClient on Starlette (if it's going to be deprecated/removed or switch to httpx).
@graingert Closing this as stale.
You're a member, so if you think we should reopen, go ahead. 😗
Oh yeah this needs doing lol
Wait no. Doing everything via httpx is obviously better