8000 [3.6] bpo-30420: List cwd parameter in subprocess convenience APIs (G… · python/cpython@0a4fe1d · GitHub
[go: up one dir, main page]

Skip to content

Commit 0a4fe1d

Browse files
authored
[3.6] bpo-30420: List cwd parameter in subprocess convenience APIs (GH-1685) (GH-2253)
Partially clarify the subprocess convenience API documentation by explicitly listing the `cwd` parameter in their abbreviated signatures. While this has been merged as an improvement, it doesn't fully resolve the issue, as the `cwd` should also be covered in the "Frequently Used Arguments" section, and the fact these APIs pass unlisted keyword arguments down to the lower level APIs is currently still unclear. (cherry picked from commit 368cf1d)
1 parent 06d6e3d commit 0a4fe1d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/library/subprocess.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ compatibility with older versions, see the :ref:`call-function-trio` section.
3838

3939

4040
.. function:: run(args, *, stdin=None, input=None, stdout=None, stderr=None,\
41-
shell=False, timeout=None, check=False, \
41+
shell=False, cwd=None, timeout=None, check=False, \
4242
encoding=None, errors=None)
4343

4444
Run the command described by *args*. Wait for command to complete, then
@@ -856,7 +856,7 @@ Prior to Python 3.5, these three functions comprised the high level API to
856856
subprocess. You can now use :func:`run` in many cases, but lots of existing code
857857
calls these functions.
858858

859-
.. function:: call(args, *, stdin=None, stdout=None, stderr=None, shell=False, timeout=None)
859+
.. function:: call(args, *, stdin=None, stdout=None, stderr=None, shell=False, cwd=None, timeout=None)
860860

861861
Run the command described by *args*. Wait for command to complete, then
862862
return the :attr:`~Popen.returncode` attribute.
@@ -882,7 +882,7 @@ calls these functions.
882882
.. versionchanged:: 3.3
883883
*timeout* was added.
884884

885-
.. function:: check_call(args, *, stdin=None, stdout=None, stderr=None, shell=False, timeout=None)
885+
.. function:: check_call(args, *, stdin=None, stdout=None, stderr=None, shell=False, cwd=None, timeout=None)
886886

887887
Run command with arguments. Wait for command to complete. If the return
888888
code was zero then return, otherwise raise :exc:`CalledProcessError`. The
@@ -912,7 +912,7 @@ calls these functions.
912912

913913

914914
.. function:: check_output(args, *, stdin=None, stderr=None, shell=False, \
915-
encoding=None, errors=None, \
915+
cwd=None, encoding=None, errors=None, \
916916
universal_newlines=False, timeout=None)
917917

918918
Run command with arguments and return its output.

0 commit comments

Comments
 (0)
0