diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-02-08 23:45:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-08 23:45:17 (GMT) |
commit | 9889de3fa734abf4064c9b188bb00b722a4e229c (patch) | |
tree | 2944968c680c4e0f166ab9282fd8c5190a0cb8b0 /Doc | |
parent | c63d7c95bafd0beabc36ea1461966f1ef8fe9c7f (diff) | |
download | cpython-9889de3fa734abf4064c9b188bb00b722a4e229c.zip cpython-9889de3fa734abf4064c9b188bb00b722a4e229c.tar.gz cpython-9889de3fa734abf4064c9b188bb00b722a4e229c.tar.bz2 |
Apply suggestions from code review
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/subprocess.rst | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index d9576cc..fc66663 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -110,6 +110,14 @@ underlying :class:`Popen` interface can be used directly. Added the *text* parameter, as a more understandable alias of *universal_newlines*. Added the *capture_output* parameter. + .. versionchanged:: 3.10.11 + + Changed Windows shell search order for ``shell=True``. The current + directory and ``%PATH%`` are replaced with ``%COMSPEC%`` and + ``%SystemRoot%\System32\cmd.exe``. As a result, dropping a + malicious program named ``cmd.exe`` into a current directory no + longer works. + .. class:: CompletedProcess The return value from :func:`run`, representing a process that has finished. @@ -486,6 +494,14 @@ functions. *executable* parameter accepts a bytes and :term:`path-like object` on Windows. + .. versionchanged:: 3.10.11 + + Changed Windows shell search order for ``shell=True``. The current + directory and ``%PATH%`` are replaced with ``%COMSPEC%`` and + ``%SystemRoot%\System32\cmd.exe``. As a result, dropping a + malicious program named ``cmd.exe`` into a current directory no + longer works. + *stdin*, *stdout* and *stderr* specify the executed program's standard input, standard output and standard error file handles, respectively. Valid values are :data:`PIPE`, :data:`DEVNULL`, an existing file descriptor (a positive @@ -1152,6 +1168,14 @@ calls these functions. .. versionchanged:: 3.3 *timeout* was added. + .. versionchanged:: 3.10.11 + + Changed Windows shell search order for ``shell=True``. The current + directory and ``%PATH%`` are replaced with ``%COMSPEC%`` and + ``%SystemRoot%\System32\cmd.exe``. As a result, dropping a + malicious program named ``cmd.exe`` into a current directory no + longer works. + .. function:: check_call(args, *, stdin=None, stdout=None, stderr=None, \ shell=False, cwd=None, timeout=None, \ **other_popen_kwargs) @@ -1184,6 +1208,14 @@ calls these functions. .. versionchanged:: 3.3 *timeout* was added. + .. versionchanged:: 3.10.11 + + Changed Windows shell search order for ``shell=True``. The current + directory and ``%PATH%`` are replaced with ``%COMSPEC%`` and + ``%SystemRoot%\System32\cmd.exe``. As a result, dropping a + malicious program named ``cmd.exe`` into a current directory no + longer works. + .. function:: check_output(args, *, stdin=None, stderr=None, shell=False, \ cwd=None, encoding=None, errors=None, \ @@ -1239,6 +1271,14 @@ calls these functions. .. versionadded:: 3.7 *text* was added as a more readable alias for *universal_newlines*. + .. versionchanged:: 3.10.11 + + Changed Windows shell search order for ``shell=True``. The current + directory and ``%PATH%`` are replaced with ``%COMSPEC%`` and + ``%SystemRoot%\System32\cmd.exe``. As a result, dropping a + malicious program named ``cmd.exe`` into a current directory no + longer works. + .. _subprocess-replacements: |