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 vstinner
Recipients christian.heimes, giampaolo.rodola, gregory.p.smith, izbyshev, vstinner
Date 2019-01-17.09:28:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547717316.29.0.779136445821.issue35755@roundup.psfhosted.org>
In-reply-to
Content
I wrote PR 11586 to remove the current directory from os.defpath.

I would prefer to first decide how the os, subprocess, shutil and distutils modules have to handle a PATH variable set to an empty string, before merging my PR. I would prefer to have the same behavior for these modules.


Gregory P. Smith:
> I'm not arguing against this change, just trying to figure out where it came from in the first place.  We should fix the value on all OSes.

Oh, I didn't know that Windows had the same behavior... I didn't know that Windows has a default search path! C:\bin? Who has such directory?

I agree that it's better to have the same behavior on all platforms.


Gregory P. Smith:
> It would be a behavior change so probably only good for 3.8+.

I concur. It's a backward incompatible change.


Christian Heimes:
> My /usr/include/paths.h has #define _PATH_DEFPATH "/usr/bin:/bin" and #define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin". The file is pretty old and has copyright from 89 and 93, https://code.woboq.org/gcc/include/paths.h.html

On my Fedora 29, this file comes from the glibc:

$ rpm -qf /usr/include/paths.h
glibc-headers-2.28-26.fc29.i686

According to execvp() manual page, the current directory has only been removed from glibc 2.24 (2016-08-05).
History
Date User Action Args
2019-01-17 09:28:37vstinnersetrecipients: + vstinner, gregory.p.smith, giampaolo.rodola, christian.heimes, izbyshev
2019-01-17 09:28:36vstinnersetmessageid: <1547717316.29.0.779136445821.issue35755@roundup.psfhosted.org>
2019-01-17 09:28:36vstinnerlinkissue35755 messages
2019-01-17 09:28:36vstinnercreate