Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(14)

Unified Diff: Doc/library/subprocess.rst

Issue 24420: Documentation regressions from adding subprocess.run()
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Doc/library/subprocess.rst Tue Jun 09 14:24:30 2015 -0400
+++ b/Doc/library/subprocess.rst Wed Jun 10 04:01:37 2015 +0000
@@ -825,7 +825,7 @@
.. function:: call(args, *, stdin=None, stdout=None, stderr=None, shell=False, timeout=None)
Run the command described by *args*. Wait for command to complete, then
- return the :attr:`returncode` attribute.
+ return the :attr:`~Popen.returncode` attribute.
This is equivalent to::
@@ -833,6 +833,11 @@
(except that the *input* and *check* parameters are not supported)
+ The arguments shown above are merely the most
+ common ones. The full function signature is largely the
+ same as that of the :class:`Popen` constructor - this function passes all
+ supplied arguments other than *timeout* directly through to that interface.
+
.. note::
Do not use ``stdout=PIPE`` or ``stderr=PIPE`` with this
@@ -856,6 +861,11 @@
(except that the *input* parameter is not supported)
+ The arguments shown above are merely the most
+ common ones. The full function signature is largely the
+ same as that of the :class:`Popen` constructor - this function passes all
+ supplied arguments other than *timeout* directly through to that interface.
+
.. note::
Do not use ``stdout=PIPE`` or ``stderr=PIPE`` with this
@@ -867,7 +877,7 @@
*timeout* was added.
-.. function:: check_output(args, *, input=None, stdin=None, stderr=None, shell=False, universal_newlines=False, timeout=None)
+.. function:: check_output(args, *[, input], stdin=None, stderr=None, shell=False, universal_newlines=False, timeout=None)
berkerpeksag 2015/06/25 23:31:14 I think we can now remove *input* from the signatu
Martin Panter 2015/06/26 02:32:56 Yes I agree. I might tweak the new paragraph and t
berkerpeksag 2015/06/26 13:16:58 Yes, that would be better.
Run command with arguments and return its output.
@@ -880,6 +890,13 @@
run(..., check=True, stdout=PIPE).stdout
+ The arguments shown above are merely the most common ones.
+ The full function signature is largely the same as that of :func:`run` -
+ most arguments are passed directly through to that interface.
+ The differences are that explicitly passing ``input=None`` is not
+ supported, and that *stdout* is not permitted as an argument, as
+ it is used internally to collect the output from the subprocess.
+
By default, this function will return the data as encoded bytes. The actual
encoding of the output data may depend on the command being invoked, so the
decoding to text will often need to be handled at the application level.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+