Skip to content

Commit 7432f09

Browse files
jstasiakmiss-islington
authored andcommitted
Update subprocess.Popen documentation wrt universal_newlines arg (pythonGH-10337)
* universal_newlines defaulting to False would suggest, that not specifying universal_newlines explicitly and setting text to True should cause an error, which is not the case. * The run function didn't have the universal_newlines parameter documented * The check_output function didn't have its text parameter documented
1 parent 082875d commit 7432f09

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Doc/library/subprocess.rst

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

4040
.. function:: run(args, *, stdin=None, input=None, stdout=None, stderr=None,\
4141
capture_output=False, shell=False, cwd=None, timeout=None, \
42-
check=False, encoding=None, errors=None, text=None, env=None)
42+
check=False, encoding=None, errors=None, text=None, env=None, \
43+
universal_newlines=None)
4344

4445
Run the command described by *args*. Wait for command to complete, then
4546
return a :class:`CompletedProcess` instance.
@@ -334,7 +335,7 @@ functions.
334335

335336
.. class:: Popen(args, bufsize=-1, executable=None, stdin=None, stdout=None, \
336337
stderr=None, preexec_fn=None, close_fds=True, shell=False, \
337-
cwd=None, env=None, universal_newlines=False, \
338+
cwd=None, env=None, universal_newlines=None, \
338339
startupinfo=None, creationflags=0, restore_signals=True, \
339340
start_new_session=False, pass_fds=(), *, \
340341
encoding=None, errors=None, text=None)
@@ -1055,7 +1056,7 @@ calls these functions.
10551056

10561057
.. function:: check_output(args, *, stdin=None, stderr=None, shell=False, \
10571058
cwd=None, encoding=None, errors=None, \
1058-
universal_newlines=False, timeout=None)
1059+
universal_newlines=None, timeout=None, text=None)
10591060

10601061
Run command with arguments and return its output.
10611062

@@ -1101,6 +1102,10 @@ calls these functions.
11011102
.. versionchanged:: 3.6
11021103
*encoding* and *errors* were added. See :func:`run` for details.
11031104

1105+
.. versionadded:: 3.7
1106+
*text* was added as a more readable alias for *universal_newlines*.
1107+
1108+
11041109
.. _subprocess-replacements:
11051110

11061111
Replacing Older Functions with the :mod:`subprocess` Module

0 commit comments

Comments
 (0)