Viktor Kovtun added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31556>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to