Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-31961: Fix support of path-like executables in subprocess. #5914

Merged
merged 19 commits into from
May 28, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9e87239
bpo-31961: Fix support of path-like executables in subprocess.
serhiy-storchaka Feb 26, 2018
8cce344
More changes:
serhiy-storchaka Feb 27, 2018
0b4e876
Revert "Revert "bpo-31961: subprocess now accepts path-like args (GH-…
serhiy-storchaka Feb 28, 2018
e72cf67
Merge branch 'revert-revert-31961' into subprocess-pathlike
serhiy-storchaka Feb 28, 2018
ccd3464
Restore NEWS.
serhiy-storchaka Feb 28, 2018
291b0c6
Merge branch 'master' into subprocess-pathlike
serhiy-storchaka Mar 2, 2018
cee318b
Minimize docs changes.
serhiy-storchaka Mar 27, 2018
43eef6c
Merge branch 'master' into subprocess-pathlike
serhiy-storchaka Mar 27, 2018
5c0dd88
Retarget to 3.8 and add a news entry.
serhiy-storchaka Mar 27, 2018
ab8ebfe
Merge branch 'master' into subprocess-pathlike
serhiy-storchaka Jul 8, 2018
80f0af3
Merge branch 'master' into subprocess-pathlike
serhiy-storchaka Sep 18, 2018
9a0e746
Merge branch 'master' into subprocess-pathlike
serhiy-storchaka Sep 19, 2018
148b13d
Merge branch 'master' into subprocess-pathlike
serhiy-storchaka Oct 30, 2018
6a8d394
Add support for bytes and path-like args.
serhiy-storchaka Oct 30, 2018
10fba36
Merge branch 'master' into subprocess-pathlike
serhiy-storchaka Nov 18, 2018
7d51e79
Improve error messages for invalid args.
serhiy-storchaka Nov 18, 2018
1073a0f
Fix the NEWS wording to be correct English.
gpshead May 18, 2019
fe37262
Merge branch 'master' into subprocess-pathlike
serhiy-storchaka May 25, 2019
c6b0ade
Merge branch 'subprocess-pathlike' of github.com:serhiy-storchaka/cpy…
serhiy-storchaka May 25, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions Doc/library/subprocess.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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 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.

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
Expand Down Expand Up @@ -558,6 +558,10 @@ 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
^^^^^^^^^^
Expand Down
1 change: 0 additions & 1 deletion Misc/NEWS.d/3.7.0b1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,6 @@ Add contextlib.AsyncExitStack. Patch by Alexander Mohr and Ilya Kulakov.
.. nonce: x5Sv0R
.. section: Library

*Removed in Python 3.7.0b2.*
The *args* argument of subprocess.Popen can now be a :term:`path-like
object`. If *args* is given as a sequence, it's first element can now be a
:term:`path-like object` as well.
Expand Down