-
-
Notifications
You must be signed in to change notification settings - Fork 268
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 --pip-version 24.1
and Python 3.13.
#2435
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -257,21 +257,13 @@ def values(cls): | |
requires_python=">=3.7,<3.13", | ||
) | ||
|
||
# This is https://github.com/pypa/pip/pull/12462 which is approved but not yet merged or | ||
# released. It allows testing Python 3.13 pre-releases but should not be used by the public; so | ||
# we keep it hidden. | ||
v24_0_dev0_patched = PipVersionValue( | ||
name="24.0.dev0-patched", | ||
version="24.0.dev0+patched", | ||
requirement=( | ||
"pip @ git+https://github.com/jsirois/pip@0257c9422f7bb99a6f319b54f808a5c50339be6c" | ||
), | ||
setuptools_version="69.0.3", | ||
wheel_version="0.42.0", | ||
requires_python=">=3.7", | ||
hidden=True, | ||
v24_1 = PipVersionValue( | ||
version="24.1", | ||
setuptools_version="70.1.0", | ||
wheel_version="0.43.0", | ||
requires_python=">=3.8,<3.14", | ||
) | ||
|
||
VENDORED = v20_3_4_patched | ||
LATEST = LatestPipVersion() | ||
DEFAULT = DefaultPipVersion(preferred=(VENDORED, v23_2)) | ||
DEFAULT = DefaultPipVersion(preferred=(VENDORED, v23_2, v24_1)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to confirm by default pex will select the first compatible pip version right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's right. These entries effectively mark where Python broke Pip. In this case, Pip relied on APIs in |
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.
As noted in the locker patches, pypa/packaging#802, which Pip 24.1 uses, necessitated a different tactic here. Instead of scraping logs for ~
KeyError
s when a marker key was missing, we must appease the packaging "local" hack for thepython_full_version
marker by always returning a stringy value that supports.endswith
. We do this here and then just test values in the now-patchedmarkers._eval_op
below inpex/pip/foreign_platform/markers.py
: https://github.com/pex-tool/pex/pull/2435/files#diff-20427b0b02256628895cffcee477785698b69ef0f4208176e6638e76f1279bbdR45This switch in tactic mirrors the locker patching tactic already in place, patching both markers and the eval of them.