wide-midnight-78598
10/25/2025, 5:13 PMwide-midnight-78598
10/25/2025, 5:16 PMwide-midnight-78598
10/25/2025, 5:16 PMproud-dentist-22844
10/27/2025, 6:59 PMpip_version = latest has some gotchas. It means "use the latest version registered in pex, but if that's not compatible with the interpreter constraints, fall back to the oldest compatible version of pip, which is often the vendored version of pip".
There's also a pip_version = latest_compatible but that is only a partial fix.
The information about interpreter_constraints is not available when pex is bootstrapping (which includes selecting the pip version), so latest_compatible provides a partial work around by checking for the latest version that is compatible with the version of python that is currently running pex. If that version of python happens to be a version outside the range of interpreter_constraints, then it will, again, fall back to the the oldest compatible version of pip, which is often the vendored version of pip.
So, both pip_version = latest and pip_version = latest_compatible adjust the logic during pex bootstrap, but they do NOT impact the fallback version used once pex reexecs with a python interpreter that matches the requested interpreter constraints.
I looked at adding a fallback_to_latest_compatible option, but I did not want to spend time figuring out how to test that, so I have abandoned it (anyone is welcome to pick it up and polish it into something John would accept) .https://github.com/pex-tool/pex/compare/main...cognifloyd:pex:lock-with-latest-compatible-pipwide-midnight-78598
10/27/2025, 7:00 PMproud-dentist-22844
10/27/2025, 7:14 PM