-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
make pyenv
backend respect patch version constraints
#21139
make pyenv
backend respect patch version constraints
#21139
Conversation
fixes pantsbuild#20175 fix inspired by pantsbuild#19462
Thank you for contributing! The code looks good to me, but I'll loop @thejcannon in too. Could we add a test to One option might be evolving the pants/src/python/pants/backend/python/providers/pyenv/rules_integration_test.py Lines 65 to 66 in cfb3caf
|
@huonw Added the test. Pretty much as you described. Also made sure that the test fails without this PR:
With the fixes from this PR it passes. |
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.
Nice one! I like it.
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.
Ah, I did another skim and thought of a few other things. Sorry about the dribble of reviews!
for (major, minor, patch) in supported_triplets | ||
if major == major_to_use and minor == minor_to_use and patch <= latest_known_patch | ||
) | ||
except ValueError as e: |
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.
Ah, on second-review: it'd be good to have a test that validates this logic too, i.e. interpreter constraints that constraint to a patch version that Pyenv doesn't know about (and hopefully will never know about, to avoid spurious failures in future).
…ct_patch_constraint
Thanks for the contribution @jonasrauber! I've been nitpicky, so I'll fix those minor issues myself rather than force it onto you. |
fixes #20175
fix inspired by #19462