mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
bpo-32636: Fix @asyncio.coroutine debug mode bug exposed by gh-5250 (#5291)
This commit is contained in:
parent
0a5e71b4c7
commit
fb5a7ad421
2 changed files with 19 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue