mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (#5912)
* Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)"
This reverts commit dd42cb71f2.
This commit is contained in:
parent
cc5ac04c07
commit
be50a7b627
4 changed files with 9 additions and 51 deletions
|
|
@ -339,12 +339,12 @@ functions.
|
|||
the class uses the Windows ``CreateProcess()`` function. The arguments to
|
||||
:class:`Popen` are as follows.
|
||||
|
||||
*args* should be a sequence of program arguments or else a single string or
|
||||
:term:`path-like object`. By default, the program to execute is the first
|
||||
item in *args* if *args* is a sequence. If *args* is a string, the
|
||||
interpretation is platform-dependent and described below. See the *shell*
|
||||
and *executable* arguments for additional differences from the default
|
||||
behavior. Unless otherwise stated, it is recommended to pass *args* as a sequence.
|
||||
*args* should be a sequence of program arguments or else a single string.
|
||||
By default, the program to execute is the first item in *args* if *args* is
|
||||
a sequence. If *args* is a string, the interpretation is
|
||||
platform-dependent and described below. See the *shell* and *executable*
|
||||
arguments for additional differences from the default behavior. Unless
|
||||
otherwise stated, it is recommended to pass *args* as a sequence.
|
||||
|
||||
On POSIX, if *args* is a string, the string is interpreted as the name or
|
||||
path of the program to execute. However, this can only be done if not
|
||||
|
|
@ -558,10 +558,6 @@ functions.
|
|||
Popen destructor now emits a :exc:`ResourceWarning` warning if the child
|
||||
process is still running.
|
||||
|
||||
.. versionchanged:: 3.7
|
||||
*args*, or the first element of *args* if *args* is a sequence, can now
|
||||
be a :term:`path-like object`.
|
||||
|
||||
|
||||
Exceptions
|
||||
^^^^^^^^^^
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue