Issue 25647: Return of asyncio.coroutine from asyncio.coroutine doesn't work with enabled asyncio debug (original) (raw)
Issue25647
Created on 2015-11-17 12:05 by vrutsky, last changed 2022-04-11 14:58 by admin. This issue is now closed.
Files | |||
---|---|---|---|
File name | Uploaded | Description | Edit |
fix_return_of_coro_from_coro.diff | vrutsky,2015-11-17 12:05 | Fix this issue + adds test for it | review |
Messages (3) | ||
---|---|---|
msg254799 - (view) | Author: Vladimir Rutsky (vrutsky) * | Date: 2015-11-17 12:05 |
Return of @asyncio.coroutine-wrapped coroutine object from @asyncio.coroutine-wrapped coroutine fails if asyncio debug is enabled. Consider following example: @asyncio.coroutine def outer_coro(): @asyncio.coroutine def inner_coro(): return 1 return g() result = loop.run_until_complete(outer_coro()) If debug is disabled result will be 1, if debug is enabled, result will be CoroWrapper object. This issue is discussed on asyncio mailing list: https://groups.google.com/forum/?fromgroups#!topic/python-tulip/YFfFxftxxDc Complete example to reproduce this problem is here: https://gist.github.com/rutsky/c72be2edeb1c8256d680 Attaching patch for Python 3.4 branch that fixes this issue and add test for this bug. This issue is not reproduced in Python 3.5, because CoroWrapper is awaitable in Python 3.5 (and in Python 3.4 CoroWrapper is not future or generator). | ||
msg261115 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2016-03-02 15:49 |
New changeset fd21f162e377 by Yury Selivanov in branch '3.5': asyncio: Fix @coroutine to recognize CoroWrapper (issue #25647) https://hg.python.org/cpython/rev/fd21f162e377 New changeset e3aee2f16937 by Yury Selivanov in branch 'default': Merge 3.5 (issue #25647) https://hg.python.org/cpython/rev/e3aee2f16937 | ||
msg261116 - (view) | Author: Yury Selivanov (yselivanov) * ![]() |
Date: 2016-03-02 15:51 |
Vladimir, thanks for the patch! |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:58:23 | admin | set | github: 69833 |
2016-03-02 15:51:17 | yselivanov | set | status: open -> closedtype: behaviormessages: + resolution: fixedstage: resolved |
2016-03-02 15:49:47 | python-dev | set | nosy: + python-devmessages: + |
2015-11-17 12:06:10 | vrutsky | set | title: Return of asyncio.coroutine from asyncio.coroutine doesn't work in with enabled debug -> Return of asyncio.coroutine from asyncio.coroutine doesn't work with enabled asyncio debug |
2015-11-17 12:05:47 | vrutsky | set | title: Return of asyncio.coroutine from asyncio.coroutine don't work in with enabled debug -> Return of asyncio.coroutine from asyncio.coroutine doesn't work in with enabled debug |
2015-11-17 12:05:09 | vrutsky | create |