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.
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
Prefer
$EBPYTHONPREFIXES
over$PYTHONPATH
#4496Prefer
$EBPYTHONPREFIXES
over$PYTHONPATH
#4496Changes from 10 commits
0ec2df5
74a3cb3
03e304e
b07ea3f
8c66e1a
ccd3d7e
f76f320
8b5389f
cb6adb0
4a11f2f
c471e03
2676e4e
f4fbe76
92f0e62
e91186e
236c67f
ca304fb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Checking the logic in
_filter_paths
I see an issue here: You iteratepaths
multiple times: Here and at https://github.com/easybuilders/easybuild-framework/pull/4496/files#diff-4af72e9777d353325a29df400ab4229e14defd653e413db51786dc2172d3baefR275 but inside_update_paths
you call_filter_paths
which "coerces a generator into a list" if it isn't a list yet.This means it this point
paths
might be a generator which can only be iterated once as otherwise the code in_filter_paths
wasn't required.Similar to my previous reasoning about breaking change in favor of cleaner code: I would simply disallow passing anything but a a string or a list to
update_paths
and assert that it is a list in_filter_paths
instead of trying to convert a potentially exhausted generator to a list here or there.Quick example:
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.
--prefer-ebpythonprefixes
is specific enough, I thinkThere 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.
We bounced around a bunch of different names, so i'm currently thinking maybe
--replace-pythonpath
is good enough. The EBPYTHONPREFIXES name is kind of an internal implementation detail in easybuild which wouldn't mean much to any user. The comment and documentation could go into more depth to explain it and how it connects to the site customize script our python installs have.The fact that it doesn't always replace pythonpath, exceptions really are very rare, and this wouldn't be the first option that does what is claims only when it is supported.