git: 41dbb7611294 - main - lang/python311: fix asyncio.subprocess regression
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 23 Dec 2022 18:42:57 UTC
The branch main has been updated by amdmi3:
URL: https://cgit.FreeBSD.org/ports/commit/?id=41dbb76112949cccafb9b73ff94565dd55e70890
commit 41dbb76112949cccafb9b73ff94565dd55e70890
Author: Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2022-12-13 12:00:27 +0000
Commit: Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2022-12-23 18:42:37 +0000
lang/python311: fix asyncio.subprocess regression
Fix losing stdout of asyncio.subprocess spawned processes.
PR: 268502
Approved by: wen (python@)
Upstream issue: https://github.com/python/cpython/issues/100133
---
lang/python311/Makefile | 1 +
lang/python311/files/patch-GH-100133 | 24 ++++++++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/lang/python311/Makefile b/lang/python311/Makefile
index 81b31ae90b5c..900776860f1f 100644
--- a/lang/python311/Makefile
+++ b/lang/python311/Makefile
@@ -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}
diff --git a/lang/python311/files/patch-GH-100133 b/lang/python311/files/patch-GH-100133
new file mode 100644
index 000000000000..6db2c1b3eec1
--- /dev/null
+++ b/lang/python311/files/patch-GH-100133
@@ -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()
+