This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.dower
Recipients Benedek Rácz, Jurko.Gospodnetić, eric.smith, eryksun, paul.moore, steve.dower, tim.golden, uranusjr, zach.ware
Date 2020-06-12.12:01:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1591963304.53.0.599494423279.issue38905@roundup.psfhosted.org>
In-reply-to
Content
Thanks for confirming that reality aligns with the documentation.

> when doing the same and passing `shell=True` to the POpen() call, there is no such initial folder in the lookup

Correct, because a fully qualified path to cmd.exe is used, and cmd.exe's application folder is not Python's.

Ultimately, the above behaviour could have occurred anyway, so all that has really happened is that it is now more obvious. This is what always happens when you include support for other platforms - you find out which of your previous assumptions were incorrect (same principle applies to all of life if you think about it).

If someone wants to update subprocess to manually search PATH when just provided with a filename, I'm okay with that. It would be a new enhancement though.

For earlier versions, updating the docs to clarify that subprocess does not do a PATH search but relies on operating system behaviour for relative paths is probably the most helpful way to raise awareness.
History
Date User Action Args
2020-06-12 12:01:44steve.dowersetrecipients: + steve.dower, paul.moore, eric.smith, tim.golden, Jurko.Gospodnetić, zach.ware, eryksun, uranusjr, Benedek Rácz
2020-06-12 12:01:44steve.dowersetmessageid: <1591963304.53.0.599494423279.issue38905@roundup.psfhosted.org>
2020-06-12 12:01:44steve.dowerlinkissue38905 messages
2020-06-12 12:01:44steve.dowercreate