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 njs
Recipients asvetlov, njs, vstinner, yselivanov
Date 2018-01-24.01:27:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1516757226.14.0.467229070634.issue32636@psf.upfronthosting.co.za>
In-reply-to
Content
Question: there are lots of tests -- for example test.test_asyncio.test_tasks.CTaskSubclass_PyFuture_Tests.test_wait_with_exception, which freezes for me -- that use 'yield from asyncio.sleep(...)', e.g.:

        @asyncio.coroutine
        def sleeper():
            yield from asyncio.sleep(0.15, loop=loop)
            raise ZeroDivisionError('really')

But Andrew switch asyncio.sleep to be an ordinary 'async def' coroutine back in December. How does this work at all?

My tentative hypothesis about the actual bug is that the code above is working in regular mode, but stops working in debug mode, probably because in debug mode @asyncio.coroutine takes a different path involving CoroWrapper and we changed CoroWrapper. But I'm having trouble knowing how to verify or fix that because I don't understand how it ever works in the first place :-)
History
Date User Action Args
2018-01-24 01:27:06njssetrecipients: + njs, vstinner, asvetlov, yselivanov
2018-01-24 01:27:06njssetmessageid: <1516757226.14.0.467229070634.issue32636@psf.upfronthosting.co.za>
2018-01-24 01:27:06njslinkissue32636 messages
2018-01-24 01:27:05njscreate