summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorNathaniel J. Smith <njs@pobox.com>2018-01-24 20:14:33 (GMT)
committerYury Selivanov <yury@magic.io>2018-01-24 20:14:33 (GMT)
commitfb5a7ad421ac20c49218ee4b86fb0d85ca4cd664 (patch)
tree732c85b5d8ce04bb71c05a507cfe226e4c0fd248 /Lib/asyncio
parent0a5e71b4c70aab87125a54d7a59765e18d7583a4 (diff)
downloadcpython-fb5a7ad421ac20c49218ee4b86fb0d85ca4cd664.zip
cpython-fb5a7ad421ac20c49218ee4b86fb0d85ca4cd664.tar.gz
cpython-fb5a7ad421ac20c49218ee4b86fb0d85ca4cd664.tar.bz2
bpo-32636: Fix @asyncio.coroutine debug mode bug exposed by gh-5250 (#5291)
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/coroutines.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/asyncio/coroutines.py b/Lib/asyncio/coroutines.py
index 5a29100..c7fcd44 100644
--- a/Lib/asyncio/coroutines.py
+++ b/Lib/asyncio/coroutines.py
@@ -132,8 +132,9 @@ def coroutine(func):
res = yield from await_meth()
return res
+ coro = types.coroutine(coro)
if not _DEBUG:
- wrapper = types.coroutine(coro)
+ wrapper = coro
else:
@functools.wraps(func)
def wrapper(*args, **kwds):