summaryrefslogtreecommitdiff
path: root/asyncio/unix_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'asyncio/unix_events.py')
-rw-r--r--asyncio/unix_events.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/asyncio/unix_events.py b/asyncio/unix_events.py
index 75e7c9c..bf3b084 100644
--- a/asyncio/unix_events.py
+++ b/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)