diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-04 15:56:33 -0400 |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-04 15:56:33 -0400 |
commit | 2a8911c0b7176aec2791460c9beac2bf22daa725 (patch) | |
tree | 158de9746b3513029e9b7cc59a42e57876cc9e7b /Lib/asyncio/unix_events.py | |
parent | 996083d6e65a96304a3d7ff61420f99883d3137e (diff) | |
download | cpython-git-2a8911c0b7176aec2791460c9beac2bf22daa725.tar.gz |
asyncio: Sync with upstream (compat module)
Diffstat (limited to 'Lib/asyncio/unix_events.py')
-rw-r--r-- | Lib/asyncio/unix_events.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py index 75e7c9ccad..bf3b0844fd 100644 --- a/Lib/asyncio/unix_events.py +++ b/Lib/asyncio/unix_events.py @@ -13,6 +13,7 @@ import warnings from . import base_events from . import base_subprocess +from . import compat from . import constants from . import coroutines from . import events @@ -370,7 +371,7 @@ class _UnixReadPipeTransport(transports.ReadTransport): # On Python 3.3 and older, objects with a destructor part of a reference # cycle are never destroyed. It's not more the case on Python 3.4 thanks # to the PEP 442. - if sys.version_info >= (3, 4): + if compat.PY34: def __del__(self): if self._pipe is not None: warnings.warn("unclosed transport %r" % self, ResourceWarning) @@ -555,7 +556,7 @@ class _UnixWritePipeTransport(transports._FlowControlMixin, # On Python 3.3 and older, objects with a destructor part of a reference # cycle are never destroyed. It's not more the case on Python 3.4 thanks # to the PEP 442. - if sys.version_info >= (3, 4): + if compat.PY34: def __del__(self): if self._pipe is not None: warnings.warn("unclosed transport %r" % self, ResourceWarning) |