From: Yury Selivanov Date: Mon, 1 Jun 2015 01:37:09 +0000 (-0400) Subject: Issue 24017: Fix asyncio.CoroWrapper to support 'async def' coroutines X-Git-Tag: v3.5.0b3~123^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=70adad2a0e7bfb2fbe70027acfb85230dc790b0b;p=python Issue 24017: Fix asyncio.CoroWrapper to support 'async def' coroutines --- diff --git a/Lib/asyncio/coroutines.py b/Lib/asyncio/coroutines.py index 4933cf83d2..edb6806210 100644 --- a/Lib/asyncio/coroutines.py +++ b/Lib/asyncio/coroutines.py @@ -120,7 +120,7 @@ class CoroWrapper: __await__ = __iter__ # make compatible with 'await' expression def __next__(self): - return next(self.gen) + return self.gen.send(None) if _YIELD_FROM_BUG: # For for CPython issue #21209: using "yield from" and a custom