summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Stasiak <jakub@stasiak.at>2018-11-12 03:40:42 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-11-12 03:40:42 (GMT)
commit7432f0929f2e90bde30e089da8e1efc580ccade1 (patch)
treefa6b86ac4e3fa14e4d5c33ad77e0f57473fcf4d7
parent082875dcd6d482558e5f1da97a1c801d60b3ed5b (diff)
downloadcpython-7432f0929f2e90bde30e089da8e1efc580ccade1.zip
cpython-7432f0929f2e90bde30e089da8e1efc580ccade1.tar.gz
cpython-7432f0929f2e90bde30e089da8e1efc580ccade1.tar.bz2
Update subprocess.Popen documentation wrt universal_newlines arg (GH-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
-rw-r--r--Doc/library/subprocess.rst11
1 files changed, 8 insertions, 3 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index 8f4377b..25f267c 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -39,7 +39,8 @@ compatibility with older versions, see the :ref:`call-function-trio` section.
.. function:: run(args, *, stdin=None, input=None, stdout=None, stderr=None,\
capture_output=False, shell=False, cwd=None, timeout=None, \
- check=False, encoding=None, errors=None, text=None, env=None)
+ check=False, encoding=None, errors=None, text=None, env=None, \
+ universal_newlines=None)
Run the command described by *args*. Wait for command to complete, then
return a :class:`CompletedProcess` instance.
@@ -334,7 +335,7 @@ functions.
.. class:: Popen(args, bufsize=-1, executable=None, stdin=None, stdout=None, \
stderr=None, preexec_fn=None, close_fds=True, shell=False, \
- cwd=None, env=None, universal_newlines=False, \
+ cwd=None, env=None, universal_newlines=None, \
startupinfo=None, creationflags=0, restore_signals=True, \
start_new_session=False, pass_fds=(), *, \
encoding=None, errors=None, text=None)
@@ -1055,7 +1056,7 @@ calls these functions.
.. function:: check_output(args, *, stdin=None, stderr=None, shell=False, \
cwd=None, encoding=None, errors=None, \
- universal_newlines=False, timeout=None)
+ universal_newlines=None, timeout=None, text=None)
Run command with arguments and return its output.
@@ -1101,6 +1102,10 @@ calls these functions.
.. versionchanged:: 3.6
*encoding* and *errors* were added. See :func:`run` for details.
+ .. versionadded:: 3.7
+ *text* was added as a more readable alias for *universal_newlines*.
+
+
.. _subprocess-replacements:
Replacing Older Functions with the :mod:`subprocess` Module