From: Florimond Manca Date: Fri, 6 Dec 2019 12:58:21 +0000 (+0100) Subject: Cleanup comments on handling MultiError (#607) X-Git-Tag: 0.9.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df9dc6d5160bad3a8c47d3f7b8f29e131756b1f3;p=thirdparty%2Fhttpx.git Cleanup comments on handling MultiError (#607) --- diff --git a/httpx/concurrency/base.py b/httpx/concurrency/base.py index ff5f72f3..24b47232 100644 --- a/httpx/concurrency/base.py +++ b/httpx/concurrency/base.py @@ -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 diff --git a/httpx/concurrency/trio.py b/httpx/concurrency/trio.py index f1fc7c42..39ac51c5 100644 --- a/httpx/concurrency/trio.py +++ b/httpx/concurrency/trio.py @@ -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: