Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 368cf1d

Browse files
alexncoghlan
authored andcommitted
bpo-30420: List cwd parameter in subprocess convenience APIs (GH-1685)
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.
1 parent 18c1356 commit 368cf1d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

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
@@ -855,7 +855,7 @@ Prior to Python 3.5, these three functions comprised the high level API to
855855
subprocess. You can now use :func:`run` in many cases, but lots of existing code
856856
calls these functions.
857857

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

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

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

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

912912

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

917917
Run command with arguments and return its output.

0 commit comments

Comments
 (0)