summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/base_events.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-08-04 19:56:33 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-08-04 19:56:33 (GMT)
commit2a8911c0b7176aec2791460c9beac2bf22daa725 (patch)
tree158de9746b3513029e9b7cc59a42e57876cc9e7b /Lib/asyncio/base_events.py
parent996083d6e65a96304a3d7ff61420f99883d3137e (diff)
downloadcpython-2a8911c0b7176aec2791460c9beac2bf22daa725.zip
cpython-2a8911c0b7176aec2791460c9beac2bf22daa725.tar.gz
cpython-2a8911c0b7176aec2791460c9beac2bf22daa725.tar.bz2
asyncio: Sync with upstream (compat module)
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r--Lib/asyncio/base_events.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index f6cc88f..c205445 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -28,6 +28,7 @@ import traceback
import sys
import warnings
+from . import compat
from . import coroutines
from . import events
from . import futures
@@ -378,7 +379,7 @@ class BaseEventLoop(events.AbstractEventLoop):
# 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 not self.is_closed():
warnings.warn("unclosed event loop %r" % self, ResourceWarning)