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 hellysmile
Recipients asvetlov, hellysmile, yselivanov
Date 2017-09-22.21:18:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1506115126.78.0.0434822641548.issue31556@psf.upfronthosting.co.za>
In-reply-to
Content
asyncio.wait_for is coroutine itself, to start executing code, no matter with this PR or not it needs to be awaited/yield from

import asyncio

@asyncio.coroutine
def foo():
    print(1)

loop = asyncio.get_event_loop()

fut = asyncio.wait_for(foo(), 0)

print('it is not raised yet')

try:
    loop.run_until_complete(fut)
except asyncio.TimeoutError:
    print('raised here')


will print 
it is not raised yet
raised here
History
Date User Action Args
2017-09-22 21:18:46hellysmilesetrecipients: + hellysmile, asvetlov, yselivanov
2017-09-22 21:18:46hellysmilesetmessageid: <1506115126.78.0.0434822641548.issue31556@psf.upfronthosting.co.za>
2017-09-22 21:18:46hellysmilelinkissue31556 messages
2017-09-22 21:18:46hellysmilecreate