[Python-checkins] Add note on capture_output arg to subprocess.run() docstring (GH-98012)

miss-islington webhook-mailer at python.org
Fri Oct 7 13:54:59 EDT 2022


https://github.com/python/cpython/commit/da986c68c913e8902695704c748fb5b14d47f1f8
commit: da986c68c913e8902695704c748fb5b14d47f1f8
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-10-07T10:54:54-07:00
summary:

Add note on capture_output arg to subprocess.run() docstring (GH-98012)


add note on capture_output arg to the docstring
(cherry picked from commit 80b3e32d6242c27094dd04c4c3d0c3d3b2889a01)

Co-authored-by: andrei kulakov <andrei.avk at gmail.com>

files:
M Lib/subprocess.py

diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index e5d7f0981861..ffe9170b68b2 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -464,7 +464,8 @@ def run(*popenargs,
 
     The returned instance will have attributes args, returncode, stdout and
     stderr. By default, stdout and stderr are not captured, and those attributes
-    will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.
+    will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
+    or pass capture_output=True to capture both.
 
     If check is True and the exit code was non-zero, it raises a
     CalledProcessError. The CalledProcessError object will have the return code



More information about the Python-checkins mailing list