https://github.com/python/cpython/commit/6871aa160f33b4d9e73428a761615aa0f7a1091b commit: 6871aa160f33b4d9e73428a761615aa0f7a1091b branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: gpshead <[email protected]> date: 2025-12-01T02:56:30Z summary:
[3.13] gh-141473: Document not calling Popen.wait after Popen.communicate times out. (GH-142101) (#142125) gh-141473: Document not calling Popen.wait after Popen.communicate times out. (GH-142101) Document not calling Popen.wait after Popen.communicate times out. Closes GH-141473 (cherry picked from commit 3e2c55749326809a2fc76b9f2cb87a6f89037ebe) Co-authored-by: Gregory P. Smith <[email protected]> files: M Doc/library/subprocess.rst diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 45dfd9ed025813..f6d9a6133fa8c0 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -846,6 +846,11 @@ Instances of the :class:`Popen` class have the following methods: proc.kill() outs, errs = proc.communicate() + After a call to :meth:`~Popen.communicate` raises :exc:`TimeoutExpired`, do + not call :meth:`~Popen.wait`. Use an additional :meth:`~Popen.communicate` + call to finish handling pipes and populate the :attr:`~Popen.returncode` + attribute. + .. note:: The data read is buffered in memory, so do not use this method if the data _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
