cpython: 6c53591d589b (original) (raw)

Mercurial > cpython

changeset 96412:6c53591d589b

Issue 24004: Support Awaitables (pep 492) in @asyncio.coroutine decorator (Merge 3.5)

Yury Selivanov yselivanov@sprymix.com
date Sat, 30 May 2015 21:02:49 -0400
parents 673dc0b8a402(current diff)d1959cafc68c(diff)
children 9d261141eb0c
files
diffstat 1 files changed, 13 insertions(+), 2 deletions(-)[+] [-] Lib/asyncio/coroutines.py 15

line wrap: on

line diff

--- a/Lib/asyncio/coroutines.py +++ b/Lib/asyncio/coroutines.py @@ -54,9 +54,10 @@ else: inspect.CO_COROUTINE) try:

except ImportError:

Check for CPython issue #21209

@@ -192,6 +193,16 @@ def coroutine(func): res = func(*args, **kw) if isinstance(res, futures.Future) or inspect.isgenerator(res): res = yield from res

if not _DEBUG: