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/unix_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/unix_events.py')
-rw-r--r-- | Lib/asyncio/unix_events.py | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py index 2806ea8..bf682a1 100644 --- a/Lib/asyncio/unix_events.py +++ b/Lib/asyncio/unix_events.py @@ -13,7 +13,6 @@ import warnings from . import base_events from . import base_subprocess -from . import compat from . import constants from . import coroutines from . import events @@ -413,15 +412,11 @@ class _UnixReadPipeTransport(transports.ReadTransport): if not self._closing: self._close(None) - # 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 self._pipe is not None: - warnings.warn("unclosed transport %r" % self, ResourceWarning, - source=self) - self._pipe.close() + def __del__(self): + if self._pipe is not None: + warnings.warn("unclosed transport %r" % self, ResourceWarning, + source=self) + self._pipe.close() def _fatal_error(self, exc, message='Fatal error on pipe transport'): # should be called by exception handler only @@ -614,15 +609,11 @@ class _UnixWritePipeTransport(transports._FlowControlMixin, # write_eof is all what we needed to close the write pipe self.write_eof() - # 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 self._pipe is not None: - warnings.warn("unclosed transport %r" % self, ResourceWarning, - source=self) - self._pipe.close() + def __del__(self): + if self._pipe is not None: + warnings.warn("unclosed transport %r" % self, ResourceWarning, + source=self) + self._pipe.close() def abort(self): self._close(None) |