summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/streams.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-07-25 00:23:21 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-07-25 00:23:21 (GMT)
commit71080fc3518e2d3555f555340c3e93f3b108a5b8 (patch)
tree5125e65a9293873cf5d307dd5de1d093de74ea8a /Lib/asyncio/streams.py
parentf05b79dbd286f6723ee717c31766c97551e4e34d (diff)
downloadcpython-71080fc3518e2d3555f555340c3e93f3b108a5b8.zip
cpython-71080fc3518e2d3555f555340c3e93f3b108a5b8.tar.gz
cpython-71080fc3518e2d3555f555340c3e93f3b108a5b8.tar.bz2
asyncio: Add asyncio.compat module
Move compatibility helpers for the different Python versions to a new asyncio.compat module.
Diffstat (limited to 'Lib/asyncio/streams.py')
-rw-r--r--Lib/asyncio/streams.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncio/streams.py b/Lib/asyncio/streams.py
index 176c65e..6cd60c4 100644
--- a/Lib/asyncio/streams.py
+++ b/Lib/asyncio/streams.py
@@ -12,6 +12,7 @@ if hasattr(socket, 'AF_UNIX'):
__all__.extend(['open_unix_connection', 'start_unix_server'])
from . import coroutines
+from . import compat
from . import events
from . import futures
from . import protocols
@@ -20,7 +21,6 @@ from .log import logger
_DEFAULT_LIMIT = 2**16
-_PY35 = sys.version_info >= (3, 5)
class IncompleteReadError(EOFError):
@@ -488,7 +488,7 @@ class StreamReader:
return b''.join(blocks)
- if _PY35:
+ if compat.PY35:
@coroutine
def __aiter__(self):
return self