[Python-checkins] cpython (merge 3.6 -> default): Merge 3.6
victor.stinner
python-checkins at python.org
Fri Jan 6 04:50:25 EST 2017
https://hg.python.org/cpython/rev/0d9530e557db
changeset: 106014:0d9530e557db
parent: 106012:4a97fa319bf7
parent: 106013:b14a1e81c34a
user: Victor Stinner <victor.stinner at gmail.com>
date: Fri Jan 06 10:49:32 2017 +0100
summary:
Merge 3.6
files:
Lib/subprocess.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -750,15 +750,15 @@
# Wait for the process to terminate, to avoid zombies.
self.wait()
- def __del__(self, _maxsize=sys.maxsize):
+ def __del__(self, _maxsize=sys.maxsize, _warn=warnings.warn):
if not self._child_created:
# We didn't get to successfully create a child process.
return
if self.returncode is None:
# Not reading subprocess exit status creates a zombi process which
# is only destroyed at the parent python process exit
- warnings.warn("subprocess %s is still running" % self.pid,
- ResourceWarning, source=self)
+ _warn("subprocess %s is still running" % self.pid,
+ ResourceWarning, source=self)
# In case the child hasn't been waited on, check if it's done.
self._internal_poll(_deadstate=_maxsize)
if self.returncode is None and _active is not None:
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list