From: Victor Stinner Date: Wed, 17 Apr 2019 15:44:06 +0000 (+0200) Subject: bpo-35755: Don't say "to mimick Unix which command behavior" (GH-12861) X-Git-Tag: v3.8.0a4~159 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=197f0447e3bcfa4f529fedab09966d7e3d283979;p=python bpo-35755: Don't say "to mimick Unix which command behavior" (GH-12861) --- diff --git a/Lib/distutils/spawn.py b/Lib/distutils/spawn.py index 888327270e..d3a12c2833 100644 --- a/Lib/distutils/spawn.py +++ b/Lib/distutils/spawn.py @@ -188,7 +188,7 @@ def find_executable(executable, path=None): # os.confstr() or CS_PATH is not available path = os.defpath # bpo-35755: Don't use os.defpath if the PATH environment variable is - # set to an empty string to mimick Unix which command behavior + # set to an empty string # PATH='' doesn't match, whereas PATH=':' looks in the current directory if not path: diff --git a/Lib/shutil.py b/Lib/shutil.py index 34df9cc474..6cfe3738f6 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -1317,7 +1317,7 @@ def which(cmd, mode=os.F_OK | os.X_OK, path=None): # os.confstr() or CS_PATH is not available path = os.defpath # bpo-35755: Don't use os.defpath if the PATH environment variable is - # set to an empty string to mimick Unix which command behavior + # set to an empty string # PATH='' doesn't match, whereas PATH=':' looks in the current directory if not path: diff --git a/Misc/NEWS.d/next/Library/2019-04-16-17-50-39.bpo-35755.Fg4EXb.rst b/Misc/NEWS.d/next/Library/2019-04-16-17-50-39.bpo-35755.Fg4EXb.rst index 8e92ffdec2..d84f63bf7b 100644 --- a/Misc/NEWS.d/next/Library/2019-04-16-17-50-39.bpo-35755.Fg4EXb.rst +++ b/Misc/NEWS.d/next/Library/2019-04-16-17-50-39.bpo-35755.Fg4EXb.rst @@ -2,5 +2,4 @@ ``os.confstr("CS_PATH")`` if available instead of :data:`os.defpath`, if the ``PATH`` environment variable is not set. Moreover, don't use ``os.confstr("CS_PATH")`` nor :data:`os.defpath` if the ``PATH`` environment -variable is set to an empty string to mimick Unix ``which`` command -behavior. +variable is set to an empty string.