]> git.ipfire.org Git - thirdparty/starlette.git/commitdiff
Merge branch 'master' into avoid-collapsing-user-exception-groups avoid-collapsing-user-exception-groups 2830/head
authorThomas Grainger <tagrain@gmail.com>
Sat, 4 Jan 2025 07:25:47 +0000 (07:25 +0000)
committerGitHub <noreply@github.com>
Sat, 4 Jan 2025 07:25:47 +0000 (07:25 +0000)
1  2 
starlette/middleware/base.py

index 77404f790735e8ffb9ac8c448ff1be1c16df7229,f146984b3428c5217a9e62aa001ff87f3ae92d2e..56bbc9d12e2892ce0355f1bc2984f63edcd3267e
@@@ -172,9 -172,10 +172,10 @@@ class BaseHTTPMiddleware
              response.raw_headers = message["headers"]
              return response
  
-         send_stream, recv_stream = anyio.create_memory_object_stream[Message]()
+         streams: anyio.create_memory_object_stream[Message] = anyio.create_memory_object_stream()
+         send_stream, recv_stream = streams
 -        with recv_stream, send_stream, collapse_excgroups():
 -            async with anyio.create_task_group() as task_group:
 +        with recv_stream, send_stream:
 +            async with create_collapsing_task_group() as task_group:
                  response = await self.dispatch_func(request, call_next)
                  await response(scope, wrapped_receive, send)
                  response_sent.set()