Message286858
when waiting for a gather that times out, everything works as expected, yet a weird error message is logged. To give a minimal example:
import asyncio
@asyncio.coroutine
def main():
try:
sleep = asyncio.sleep(0.2)
yield from asyncio.wait_for(asyncio.gather(sleep),
timeout=0.1)
except asyncio.TimeoutError:
print("timed out: fine")
yield from asyncio.sleep(0.1)
asyncio.get_event_loop().run_until_complete(main())
This outputs:
timed out: fine
_GatheringFuture exception was never retrieved
future: <_GatheringFuture finished exception=CancelledError()>
concurrent.futures._base.CancelledError
As you can see, I used the pre-3.5 syntax so I could test whether it works on older systems. No, it doesn't.
I wrote a unit test for this problem, unfortunately I couldn't solve it yet. |
|
Date |
User |
Action |
Args |
2017-02-03 11:25:24 | Martin.Teichmann | set | recipients:
+ Martin.Teichmann, gvanrossum, yselivanov |
2017-02-03 11:25:24 | Martin.Teichmann | set | messageid: <1486121124.44.0.178086142975.issue29432@psf.upfronthosting.co.za> |
2017-02-03 11:25:24 | Martin.Teichmann | link | issue29432 messages |
2017-02-03 11:25:24 | Martin.Teichmann | create | |
|