diff options
author | Yury Selivanov <yury@magic.io> | 2016-06-09 19:13:16 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-06-09 19:13:16 (GMT) |
commit | 711d25db4802bd7341b48316d169e648285aac70 (patch) | |
tree | 46628b747f3f7bd1ccdc5e9fe7186e28978fa348 /Lib/asyncio | |
parent | 5dee6551e2b98792bc6336206f763623483e7883 (diff) | |
parent | a6f6edbda8648698289a8ee7abef6a35c924151b (diff) | |
download | cpython-711d25db4802bd7341b48316d169e648285aac70.zip cpython-711d25db4802bd7341b48316d169e648285aac70.tar.gz cpython-711d25db4802bd7341b48316d169e648285aac70.tar.bz2 |
Merge 3.5 (issue #27243)
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/compat.py | 1 | ||||
-rw-r--r-- | Lib/asyncio/streams.py | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Lib/asyncio/compat.py b/Lib/asyncio/compat.py index 660b7e7..4790bb4 100644 --- a/Lib/asyncio/compat.py +++ b/Lib/asyncio/compat.py @@ -4,6 +4,7 @@ import sys PY34 = sys.version_info >= (3, 4) PY35 = sys.version_info >= (3, 5) +PY352 = sys.version_info >= (3, 5, 2) def flatten_list_bytes(list_of_data): diff --git a/Lib/asyncio/streams.py b/Lib/asyncio/streams.py index 6f465af..c88a87c 100644 --- a/Lib/asyncio/streams.py +++ b/Lib/asyncio/streams.py @@ -689,3 +689,9 @@ class StreamReader: if val == b'': raise StopAsyncIteration return val + + if compat.PY352: + # In Python 3.5.2 and greater, __aiter__ should return + # the asynchronous iterator directly. + def __aiter__(self): + return self |