[Python-checkins] cpython (merge 3.5 -> default): Merge 3.5 (issue #26741)

victor.stinner python-checkins at python.org
Fri May 20 07:09:03 EDT 2016


https://hg.python.org/cpython/rev/911f398c6396
changeset:   101448:911f398c6396
parent:      101446:b7f3494deb2c
parent:      101447:72946937536e
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Fri May 20 13:06:55 2016 +0200
summary:
  Merge 3.5 (issue #26741)

files:
  Lib/asyncio/base_subprocess.py |  4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/Lib/asyncio/base_subprocess.py b/Lib/asyncio/base_subprocess.py
--- a/Lib/asyncio/base_subprocess.py
+++ b/Lib/asyncio/base_subprocess.py
@@ -211,6 +211,10 @@
             logger.info('%r exited with return code %r',
                         self, returncode)
         self._returncode = returncode
+        if self._proc.returncode is None:
+            # asyncio uses a child watcher: copy the status into the Popen
+            # object. On Python 3.6, it is required to avoid a ResourceWarning.
+            self._proc.returncode = returncode
         self._call(self._protocol.process_exited)
         self._try_finish()
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list