-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
bpo-34530: Fix distutils find_executable() #9049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Do you mind to add tests? |
distutils.spawn.find_executable() now falls back on os.defpath if the PATH environment variable is not set.
Done. I added many tests, including tests for the fix. I also rebased my change on master. |
|
|
||
| # test os.defpath: missing PATH environment variable | ||
| with test_support.EnvironmentVarGuard() as env: | ||
| with mock.patch('distutils.spawn.os.defpath', tmp_dir): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In 2.7 you will need to use test_support.swap_attr().
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7. |
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 <[email protected]>
|
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. |
|
Sorry, @vstinner, I could not cleanly backport this to |
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 <[email protected]>
|
GH-9058 is a backport of this pull request to the 2.7 branch. |
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 <[email protected]>
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 <[email protected]>
distutils.spawn.find_executable() now falls back on os.defpath if the
PATH environment variable is not set.
https://bugs.python.org/issue34530