@@ -111,6 +111,14 @@ compatibility with older versions, see the :ref:`call-function-trio` section.
111
111
Added the *text * parameter, as a more understandable alias of *universal_newlines *.
112
112
Added the *capture_output * parameter.
113
113
114
+ .. versionchanged :: 3.7.17
115
+
116
+ Changed Windows shell search order for ``shell=True ``. The current
117
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
118
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
119
+ malicious program named ``cmd.exe `` into a current directory no
120
+ longer works.
121
+
114
122
.. class :: CompletedProcess
115
123
116
124
The return value from :func: `run `, representing a process that has finished.
@@ -442,6 +450,17 @@ functions.
442
450
:program: `ps `. If ``shell=True ``, on POSIX the *executable * argument
443
451
specifies a replacement shell for the default :file: `/bin/sh `.
444
452
453
+ .. versionchanged :: 3.6
454
+ *executable * parameter accepts a :term: `path-like object ` on POSIX.
455
+
456
+ .. versionchanged :: 3.7.17
457
+
458
+ Changed Windows shell search order for ``shell=True ``. The current
459
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
460
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
461
+ malicious program named ``cmd.exe `` into a current directory no
462
+ longer works.
463
+
445
464
*stdin *, *stdout * and *stderr * specify the executed program's standard input,
446
465
standard output and standard error file handles, respectively. Valid values
447
466
are :data: `PIPE `, :data: `DEVNULL `, an existing file descriptor (a positive
@@ -1032,6 +1051,14 @@ calls these functions.
1032
1051
.. versionchanged :: 3.3
1033
1052
*timeout * was added.
1034
1053
1054
+ .. versionchanged :: 3.7.17
1055
+
1056
+ Changed Windows shell search order for ``shell=True ``. The current
1057
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
1058
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
1059
+ malicious program named ``cmd.exe `` into a current directory no
1060
+ longer works.
1061
+
1035
1062
.. function :: check_call(args, *, stdin=None, stdout=None, stderr=None, \
1036
1063
shell=False, cwd=None, timeout=None, \
1037
1064
**other_popen_kwargs)
@@ -1062,6 +1089,14 @@ calls these functions.
1062
1089
.. versionchanged :: 3.3
1063
1090
*timeout * was added.
1064
1091
1092
+ .. versionchanged :: 3.7.17
1093
+
1094
+ Changed Windows shell search order for ``shell=True ``. The current
1095
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
1096
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
1097
+ malicious program named ``cmd.exe `` into a current directory no
1098
+ longer works.
1099
+
1065
1100
1066
1101
.. function :: check_output(args, *, stdin=None, stderr=None, shell=False, \
1067
1102
cwd=None, encoding=None, errors=None, \
@@ -1116,6 +1151,14 @@ calls these functions.
1116
1151
.. versionadded :: 3.7
1117
1152
*text * was added as a more readable alias for *universal_newlines *.
1118
1153
1154
+ .. versionchanged :: 3.7.17
1155
+
1156
+ Changed Windows shell search order for ``shell=True ``. The current
1157
+ directory and ``%PATH% `` are replaced with ``%COMSPEC% `` and
1158
+ ``%SystemRoot%\System32\cmd.exe ``. As a result, dropping a
1159
+ malicious program named ``cmd.exe `` into a current directory no
1160
+ longer works.
1161
+
1119
1162
1120
1163
.. _subprocess-replacements :
1121
1164
0 commit comments