Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
197f0447
Commit
197f0447
authored
Apr 17, 2019
by
Victor Stinner
Committed by
GitHub
Apr 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-35755: Don't say "to mimick Unix which command behavior" (GH-12861)
parent
693c104a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
+3
-4
Lib/distutils/spawn.py
Lib/distutils/spawn.py
+1
-1
Lib/shutil.py
Lib/shutil.py
+1
-1
Misc/NEWS.d/next/Library/2019-04-16-17-50-39.bpo-35755.Fg4EXb.rst
...S.d/next/Library/2019-04-16-17-50-39.bpo-35755.Fg4EXb.rst
+1
-2
No files found.
Lib/distutils/spawn.py
View file @
197f0447
...
...
@@ -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
:
...
...
Lib/shutil.py
View file @
197f0447
...
...
@@ -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
:
...
...
Misc/NEWS.d/next/Library/2019-04-16-17-50-39.bpo-35755.Fg4EXb.rst
View file @
197f0447
...
...
@@ -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.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment