Yury Selivanov added the comment:
This isn't a bug. Python doesn't magically unwind awaitables, you have to do
that yourself:
async def two():
await (await one())
Broadly speaking, returning awaitables from coroutines is an anti-pattern.
Closing this one. Feel free to re-open or ask
New submission from Gavin Panella:
The following will sleep:
async def one():
await asyncio.sleep(10)
async def two():
await one()
loop.run_until_complete(two())
but the following will not:
async def one():
return asyncio.sleep(10)
async def two():
await