[Python-checkins] cpython (3.4): Issue 24017: Fix asyncio.CoroWrapper to support 'async def' coroutines

yury.selivanov python-checkins at python.org
Mon Jun 1 03:37:41 CEST 2015


https://hg.python.org/cpython/rev/0708aabefb55
changeset:   96437:0708aabefb55
branch:      3.4
parent:      96410:b7b73029c825
user:        Yury Selivanov <yselivanov at sprymix.com>
date:        Sun May 31 21:37:09 2015 -0400
summary:
  Issue 24017: Fix asyncio.CoroWrapper to support 'async def' coroutines

files:
  Lib/asyncio/coroutines.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/asyncio/coroutines.py b/Lib/asyncio/coroutines.py
--- a/Lib/asyncio/coroutines.py
+++ b/Lib/asyncio/coroutines.py
@@ -120,7 +120,7 @@
         __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

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list