]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Cleanup comments on handling MultiError (#607)
authorFlorimond Manca <florimond.manca@gmail.com>
Fri, 6 Dec 2019 12:58:21 +0000 (13:58 +0100)
committerTom Christie <tom@tomchristie.com>
Fri, 6 Dec 2019 12:58:21 +0000 (12:58 +0000)
httpx/concurrency/base.py
httpx/concurrency/trio.py

index ff5f72f30dccf653f90c8002f3ee7682599f9ea2..24b47232022e52fc6bbf15ca504590b4e11b4d0f 100644 (file)
@@ -167,6 +167,6 @@ class ConcurrencyBackend:
         and wait for them to finish.
 
         In case one of the coroutines raises an exception, cancel the other one then
-        raise. If the other coroutine had also raised an exception, ignore it (for now).
+        raise. If the other coroutine had also raised an exception, ignore it.
         """
         raise NotImplementedError()  # pragma: no cover
index f1fc7c4286f681c1a499fe2a07236007055d86bc..39ac51c5c5bafe5ba12aaeddf4d44b48441687da 100644 (file)
@@ -214,11 +214,8 @@ class TrioBackend(ConcurrencyBackend):
                 nursery.start_soon(coroutine1, *args1)
                 nursery.start_soon(coroutine2, *args2)
         except trio.MultiError as exc:
-            # NOTE: asyncio doesn't handle multi-errors yet, so we must align on its
-            # behavior here, and need to arbitrarily decide which exception to raise.
-            # We may want to add an 'httpx.MultiError', manually add support
-            # for this situation in the asyncio backend, and re-raise
-            # an 'httpx.MultiError' from trio's here.
+            # In practice, we don't actually care about raising both
+            # exceptions, so let's raise either indeterminantly.
             raise exc.exceptions[0]
 
     def get_semaphore(self, limits: PoolLimits) -> BasePoolSemaphore: