-
-
Notifications
You must be signed in to change notification settings - Fork 652
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
migrate to packaging
requirements parsing from deprecated pkg_resources
#22033
Conversation
packaging
requirements instead of pkg_resources
packaging
requirements library from deprecated pkg_resources
packaging
requirements library from deprecated pkg_resources
packaging
requirements parsing from deprecated pkg_resources
@@ -490,7 +489,6 @@ def test_partition_into_major_minor_versions(constraints: list[str], expected: l | |||
(["==3.0.*"], (3, 0)), | |||
(["==3.45.*"], (3, 45)), | |||
([">=3.45,<3.46"], (3, 45)), | |||
([">=3.45.*,<3.46.*"], (3, 45)), |
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.
Removed since .*
syntax with operators other than ==
and !=
is not accepted.
@@ -514,7 +512,6 @@ def test_partition_into_major_minor_versions(constraints: list[str], expected: l | |||
([">3.45,<=3.46"], None), | |||
([">3.45,<3.47"], None), | |||
(["===3.45"], None), | |||
([">=3.45,<=3.45.*"], None), |
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.
Removed since .*
syntax with operators other than ==
and !=
is not accepted.
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 for doing the heavy lifting on this!
src/python/pants/backend/python/util_rules/interpreter_constraints.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Benjy Weinberger <[email protected]>
Co-authored-by: Benjy Weinberger <[email protected]>
Migrate to use
Requirement
frompackaging
instead of the deprecatedpkg_resources
.The
project_name
attribute is calledname
bypackaging.requirements.Requirement
so migrate Pants naming to use that, except in lock files where we keep theproject_name
naming to avoid breaking existing lockfiles.Note in the release notes that the
.*
pattern is only permitted with==
and!=
operators.pkg_resources
accepted.*
patterns with other operators which is not permitted by the current versioning specification.