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 gregory.p.smith
Recipients asvetlov, chris.jerdonek, cvrebert, damon-atkins, docs@python, eryksun, gregory.p.smith, ned.deily, paul.moore, pepalogik, python-dev, steve.dower, tim.golden, wolma, zach.ware
Date 2018-06-14.17:14:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thanks for pointing me at this issue Ned.  It sounds like there is a behavior difference between Windows and POSIX systems related to the current directory and/or which process environment is used by the system call that launches the new process to find the executable.

It seems to have existed "forever" in subprocess module API terms, so I don't know if we should reconcile the corner cases when cwd and/or env are supplied to a single cross platform behavior as that could break existing code.  Such a behavior change _could_ be made but be 3.8 specific.  BUT:  If we did that, it becomes a challenge for people writing code that needs to work on multiple Python versions.  Popen growing yet another bool flag parameter to choose the new behavior is possible, but quite ugly (and unusable on multi-python version code).

I think we should start out by living with the difference - document these platform specific corner case behaviors to minimize surprise.

If we want to provide a way for people to have the same behavior on both, we should document a recommended way to do that.  I believe that entails telling people get an absolute path to their executable themselves before launching the subprocess as that should work the same no matter the cwd or environment?
Date User Action Args
2018-06-14 17:14:41gregory.p.smithsetrecipients: + gregory.p.smith, paul.moore, tim.golden, ned.deily, cvrebert, asvetlov, chris.jerdonek, docs@python, python-dev, zach.ware, eryksun, steve.dower, pepalogik, wolma, damon-atkins
2018-06-14 17:14:41gregory.p.smithsetmessageid: <>
2018-06-14 17:14:41gregory.p.smithlinkissue15533 messages
2018-06-14 17:14:41gregory.p.smithcreate