This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Martin.Teichmann
Recipients Martin.Teichmann, gvanrossum, yselivanov
Date 2017-02-03.11:25:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1486121124.44.0.178086142975.issue29432@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-02-03 11:25:24Martin.Teichmannsetrecipients: + Martin.Teichmann, gvanrossum, yselivanov
2017-02-03 11:25:24Martin.Teichmannsetmessageid: <1486121124.44.0.178086142975.issue29432@psf.upfronthosting.co.za>
2017-02-03 11:25:24Martin.Teichmannlinkissue29432 messages
2017-02-03 11:25:24Martin.Teichmanncreate