summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/tasks.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-07-25 00:45:18 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-07-25 00:45:18 (GMT)
commit9625340cc8ca426d0f339d460022955bc01155fd (patch)
tree02bb10987b53cbaedad246122b5470e35b26e40e /Lib/asyncio/tasks.py
parent401e52e80374783cc5d04ccee8071b540340c46b (diff)
parent389e3d768d8f5bd312476db795f6432651bc656b (diff)
downloadcpython-9625340cc8ca426d0f339d460022955bc01155fd.zip
cpython-9625340cc8ca426d0f339d460022955bc01155fd.tar.gz
cpython-9625340cc8ca426d0f339d460022955bc01155fd.tar.bz2
Merge 3.5 (asyncio)
Diffstat (limited to 'Lib/asyncio/tasks.py')
-rw-r--r--Lib/asyncio/tasks.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index d8193ba..9bfc1cf 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -10,19 +10,16 @@ import concurrent.futures
import functools
import inspect
import linecache
-import sys
-import types
import traceback
import warnings
import weakref
+from . import compat
from . import coroutines
from . import events
from . import futures
from .coroutines import coroutine
-_PY34 = (sys.version_info >= (3, 4))
-
class Task(futures.Future):
"""A coroutine wrapped in a Future."""
@@ -83,7 +80,7 @@ class Task(futures.Future):
# On Python 3.3 or older, objects with a destructor that are part of a
# reference cycle are never destroyed. That's not the case any more on
# Python 3.4 thanks to the PEP 442.
- if _PY34:
+ if compat.PY34:
def __del__(self):
if self._state == futures._PENDING and self._log_destroy_pending:
context = {