[Python-checkins] bpo-35755: Don't say "to mimick Unix which command behavior" (GH-12861)

Victor Stinner webhook-mailer at python.org
Wed Apr 17 11:44:13 EDT 2019


https://github.com/python/cpython/commit/197f0447e3bcfa4f529fedab09966d7e3d283979
commit: 197f0447e3bcfa4f529fedab09966d7e3d283979
branch: master
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2019年04月17日T17:44:06+02:00
summary:
bpo-35755: Don't say "to mimick Unix which command behavior" (GH-12861)
files:
M Lib/distutils/spawn.py
M Lib/shutil.py
M Misc/NEWS.d/next/Library/2019-04-16-17-50-39.bpo-35755.Fg4EXb.rst
diff --git a/Lib/distutils/spawn.py b/Lib/distutils/spawn.py
index 888327270e22..d3a12c283397 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 34df9cc47463..6cfe3738f6eb 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 8e92ffdec235..d84f63bf7b83 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.


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /