Skip to content
Myr

Cleanup comments on handling MultiError (#607)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Florimond Manca · committed by Tom Christie · parent ddc4885 · Browse files · 2 files+3 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−6 removed

  • other:+3 added−6 removed

2 files+3 added−6 removed

modified:httpx/concurrency/base.py+1 added-1 removed
165 unmodified lines
166 This should start 'coroutine1' with '*args1' and 'coroutine2' with '*args2',167 and wait for them to finish.168169 In case one of the coroutines raises an exception, cancel the other one then170 raise. If the other coroutine had also raised an exception, ignore it (for now).170 raise. If the other coroutine had also raised an exception, ignore it.171 """172 raise NotImplementedError() # pragma: no cover
modified:httpx/concurrency/trio.py+2 added-5 removed
212 unmodified lines
213 async with trio.open_nursery() as nursery:214 nursery.start_soon(coroutine1, *args1)215 nursery.start_soon(coroutine2, *args2)216 except trio.MultiError as exc:217 # NOTE: asyncio doesn't handle multi-errors yet, so we must align on its218 # behavior here, and need to arbitrarily decide which exception to raise.219 # We may want to add an 'httpx.MultiError', manually add support220 # for this situation in the asyncio backend, and re-raise221 # an 'httpx.MultiError' from trio's here.217 # In practice, we don't actually care about raising both218 # exceptions, so let's raise either indeterminantly.219 raise exc.exceptions[0]220221 def get_semaphore(self, limits: PoolLimits) -> BasePoolSemaphore:222 return PoolSemaphore(limits)
22 unmodified lines