bpo-35755: Remove current directory from posixpath.defpath#11586
Merged
vstinner merged 1 commit intopython:masterfrom Apr 17, 2019
vstinner:defpath
Merged
bpo-35755: Remove current directory from posixpath.defpath#11586vstinner merged 1 commit intopython:masterfrom vstinner:defpath
vstinner merged 1 commit intopython:masterfrom
vstinner:defpath
Conversation
Member
Author
|
I would prefer to not merge this change before we decided how PATH="" (empty string) should be handled: https://bugs.python.org/issue35755#msg333832 |
asottile
reviewed
Jan 17, 2019
asottile
reviewed
Jan 17, 2019
Misc/NEWS.d/next/Security/2019-01-17-10-03-48.bpo-35755.GmllIs.rst
Outdated
Show resolved
Hide resolved
Member
Author
|
Hum. The test fails on Windows: |
vstinner
commented
Jan 17, 2019
Lib/test/test_subprocess.py
Outdated
Member
Author
There was a problem hiding this comment.
Oh. It's now useless, I forgot to remove it. I will remove it once I understand the Windows failure.
Contributor
iirc the behaviour you're seeing is due to https://bugs.python.org/issue8557 |
Member
Author
|
I wrote PR #12858 to define the behavior when the PATH environment variable is set to an empty string. |
Document the change in a NEWS entry of the Security category.
vstinner
added a commit
that referenced
this pull request
Apr 17, 2019
* bpo-35755: shutil.which() uses os.confstr("CS_PATH") (GH-12858) shutil.which() and distutils.spawn.find_executable() now use os.confstr("CS_PATH") if available instead of os.defpath, if the PATH environment variable is not set. Don't use os.confstr("CS_PATH") nor os.defpath if the PATH environment variable is set to an empty string. Changes: * find_executable() now starts by checking for the executable in the current working directly case. Add an explicit "if not path: return None". * Add tests for PATH='' (empty string), PATH=':' and for PATHEXT. (cherry picked from commit 228a3c9) * bpo-35755: Remove current directory from posixpath.defpath (GH-11586) Document the change in a NEWS entry of the Security category. (cherry picked from commit 2c4c02f)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Document the change in a NEWS entry of the Security category.
https://bugs.python.org/issue35755