Skip to content

Commit

Permalink
lang/python311: fix asyncio.subprocess regression
Browse files Browse the repository at this point in the history
Fix losing stdout of asyncio.subprocess spawned processes.

PR:		268502
Approved by:	wen (python@)
Upstream issue:	python/cpython#100133
  • Loading branch information
AMDmi3 committed Dec 23, 2022
1 parent c2da169 commit 41dbb76
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions lang/python311/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PORTNAME= python
DISTVERSION= ${PYTHON_DISTVERSION}
PORTREVISION= 1
CATEGORIES= lang python
MASTER_SITES= PYTHON/ftp/python/${DISTVERSION:C/[a-z].*//}
PKGNAMESUFFIX= ${PYTHON_SUFFIX}
Expand Down
24 changes: 24 additions & 0 deletions lang/python311/files/patch-GH-100133
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
commit ae8520c70992710903819f24dbce4e7dd05d7ea8
Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Date: Wed Dec 21 02:24:19 2022 -0800

GH-100133: fix `asyncio` subprocess losing `stderr` and `stdout` output (GH-100154)

(cherry picked from commit a7715ccfba5b86ab09f86ec56ac3755c93b46b48)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>

diff --git Lib/asyncio/base_subprocess.py Lib/asyncio/base_subprocess.py
index e15bb4141f..4c9b0dd565 100644
--- Lib/asyncio/base_subprocess.py
+++ Lib/asyncio/base_subprocess.py
@@ -215,9 +215,6 @@ def _process_exited(self, returncode):
# object. On Python 3.6, it is required to avoid a ResourceWarning.
self._proc.returncode = returncode
self._call(self._protocol.process_exited)
- for p in self._pipes.values():
- if p is not None:
- p.pipe.close()

self._try_finish()

0 comments on commit 41dbb76

Please sign in to comment.