Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (GH-5912) (GH-5931)
* Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)"
This reverts commit dd42cb71f2cb02f3a32f016137b12a146bc0d0e2.
(cherry picked from commit be50a7b627d0aa37e08fa8e2d5568891f19903ce)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index a22afe0..db7a88a 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -339,12 +339,12 @@
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 @@
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
^^^^^^^^^^