[issue24495] asyncio.ensure_future() AttributeError with “async def” coroutines

2015-06-24 Thread Yury Selivanov
Yury Selivanov added the comment: Should be fixed now. Thanks for discovering this, Martin! Victor, I'll make a PR on github/asyncio with some refactoring or CoroWrapper etc. The code became too cumbersome, and has to be properly refactored. At least we should have one wrapper class for gene

[issue24495] asyncio.ensure_future() AttributeError with “async def” coroutines

2015-06-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8f4e738cb07f by Yury Selivanov in branch '3.5': Issue #24495, #24400: Test asyncio.Task.repr in debug mode https://hg.python.org/cpython/rev/8f4e738cb07f -- nosy: +python-dev ___ Python tracker

[issue24495] asyncio.ensure_future() AttributeError with “async def” coroutines

2015-06-24 Thread STINNER Victor
STINNER Victor added the comment: It's not the first time that a bug in found in _format_coroutine(). We need more unit tests! Previous bug: https://github.com/python/asyncio/issues/222 -- ___ Python tracker

[issue24495] asyncio.ensure_future() AttributeError with “async def” coroutines

2015-06-24 Thread Martin Panter
New submission from Martin Panter: While trying to port the example at to use “async def”, I discovered the ensure_future() function does not like the coroutine field name changes introduced in Issue