[3.14] gh-141473: Document not calling Popen.wait after Popen.communicate times out. (GH-142101) (#142124)
Some checks are pending
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Android (aarch64) (push) Blocked by required conditions
Tests / Android (x86_64) (push) Blocked by required conditions
Tests / iOS (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Sanitizers (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Lint / lint (push) Waiting to run

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 3e2c557493)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2025-12-01 03:55:28 +01:00 committed by GitHub
parent 8899ed52f2
commit 9cb5a93e07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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