-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
Support newer pip versions. #17555
Support newer pip versions. #17555
Conversation
Plumbs --pip-version through to pex commands that support it. Newer pips have perf improvements that may benefit users, in particular for very long-running resolves.
@@ -180,6 +187,11 @@ class PythonSetup(Subsystem): | |||
""" | |||
), | |||
) | |||
pip_version = EnumOption( | |||
default=PipVersion.V22_3, |
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.
This is potentially controversial, as we're also upgrading everyone to newer pip, rather than making it opt-in.
I think that's fine, since pip is very heavily tested, and ubiquitous, and we want to bias towards doing the right thing for new users who will not be expecting to be going back to some ancient pip.
We have an escape hatch for those who encounter an unexpected and unlikely problem in an upgrade.
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.
LGTM. I don't feel good about the world shift on existing users but it is probably mitigated by lockfile use allowing some degree of choice about when to deal with any "breaks" new resolve outputs may cause. We definitely have an ongoing tension where we fight our own deprecation rules with some regularity it seems to me.
There probably need not be verbiage about this, but the newer Pips plumbed here will cause Pex to issue a warning and automatically fall back to vendored Pip if the Python being used / specified with |
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.
Thanks! Thoughts on backporting to 2.15, but not changing the default to reduce the amount of API change? That gives an escape hatch for people with long resolves.
Hmm, I don't think this justifies backporting to 2.15, it's a feature not a bugfix. I'm OK with being more conservative, on second thoughts that makes sense. We can deprecate use of the older pip, now or later, the main thing is to give people with bad resolve perf something to try. |
And re the warning you mentioned @jsirois : I had originally thought to check the ICs on the Pants side and only set this flag if >=3.7, for that reason, but then figured that the user won't see a warning, and the fallback is in line with what they can reasonably expect. Or even better than what they can reasonably expect, since the actual expectation might be to error on the incompatibility. |
Aha, great. Yeah, having them see the warning is probably what's wanted. That does make me question what happens, though, when Pants executes a Process that succeeds but spews stderr. Does that stderr automatically just go to the terminal? I think it does, since we used to get black emoji anyhow, but I'm not positive at all on this. |
We return Black's stdout/stderr in a |
Aha. That's unfortunate. |
fwiw, we're considering leapfrogging from 2.12 straight to 2.16 just so we can address some issues we've been seeing with performance 😄 |
I'd still recommend upgrading one version at a time, in a branch, so you get all the deprecation warnings. You can just merge the final 2.16 result into main of course. |
Plumbs --pip-version through to pex commands that support it.
Newer pips have perf improvements that may benefit users, in particular for very long-running resolves.
Does not change the default. We can do that via deprecation in a followup.