bpo-34530: Fix distutils find_executable()#9049
Merged
Merged
Conversation
Member
|
Do you mind to add tests? |
distutils.spawn.find_executable() now falls back on os.defpath if the PATH environment variable is not set.
Member
Author
Done. I added many tests, including tests for the fix. I also rebased my change on master. |
serhiy-storchaka
approved these changes
Sep 4, 2018
|
|
||
| # test os.defpath: missing PATH environment variable | ||
| with test_support.EnvironmentVarGuard() as env: | ||
| with mock.patch('distutils.spawn.os.defpath', tmp_dir): |
Member
There was a problem hiding this comment.
In 2.7 you will need to use test_support.swap_attr().
Contributor
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Sep 4, 2018
distutils.spawn.find_executable() now falls back on os.defpath if the PATH environment variable is not set. (cherry picked from commit 3948719) Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
GH-9056 is a backport of this pull request to the 3.7 branch. |
|
GH-9057 is a backport of this pull request to the 3.6 branch. |
Contributor
|
Sorry, @vstinner, I could not cleanly backport this to |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Sep 4, 2018
distutils.spawn.find_executable() now falls back on os.defpath if the PATH environment variable is not set. (cherry picked from commit 3948719) Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
GH-9058 is a backport of this pull request to the 2.7 branch. |
miss-islington
added a commit
that referenced
this pull request
Sep 4, 2018
vstinner
added a commit
that referenced
this pull request
Sep 4, 2018
vstinner
added a commit
that referenced
this pull request
Sep 5, 2018
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.
distutils.spawn.find_executable() now falls back on os.defpath if the
PATH environment variable is not set.
https://bugs.python.org/issue34530