diff options
author | INADA Naoki <methane@users.noreply.github.com> | 2017-04-25 01:57:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-25 01:57:18 (GMT) |
commit | 3e2ad8ec61a322370a6fbdfb2209cf74546f5e08 (patch) | |
tree | 0285efcc8b8d9b7215e4b8dbe106960187b1e628 /Lib/asyncio/base_events.py | |
parent | f6448e5d65c349576df6e83b8324b9c208e77615 (diff) | |
download | cpython-3e2ad8ec61a322370a6fbdfb2209cf74546f5e08.zip cpython-3e2ad8ec61a322370a6fbdfb2209cf74546f5e08.tar.gz cpython-3e2ad8ec61a322370a6fbdfb2209cf74546f5e08.tar.bz2 |
bpo-29617: Remove Python 3.3 support from asyncio (GH-232)
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r-- | Lib/asyncio/base_events.py | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index 6624ac1..3ff511b 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -29,7 +29,6 @@ import sys import warnings import weakref -from . import compat from . import coroutines from . import events from . import futures @@ -499,16 +498,12 @@ class BaseEventLoop(events.AbstractEventLoop): """Returns True if the event loop was closed.""" return self._closed - # 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 compat.PY34: - def __del__(self): - if not self.is_closed(): - warnings.warn("unclosed event loop %r" % self, ResourceWarning, - source=self) - if not self.is_running(): - self.close() + def __del__(self): + if not self.is_closed(): + warnings.warn("unclosed event loop %r" % self, ResourceWarning, + source=self) + if not self.is_running(): + self.close() def is_running(self): """Returns True if the event loop is running.""" |