mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
asyncio: Sync with upstream (compat module)
This commit is contained in:
parent
996083d6e6
commit
2a8911c0b7
7 changed files with 14 additions and 16 deletions
|
@ -1,8 +1,8 @@
|
|||
import collections
|
||||
import subprocess
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
from . import compat
|
||||
from . import futures
|
||||
from . import protocols
|
||||
from . import transports
|
||||
|
@ -116,7 +116,7 @@ class BaseSubprocessTransport(transports.SubprocessTransport):
|
|||
# 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._closed:
|
||||
warnings.warn("unclosed transport %r" % self, ResourceWarning)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue