Skip to content
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

Unpin constraint on packaging #13500

Merged
merged 7 commits into from Apr 24, 2023
Merged

Unpin constraint on packaging #13500

merged 7 commits into from Apr 24, 2023

Conversation

di
Copy link
Member

@di di commented Apr 24, 2023

Fixes #12920. This PR unpins the constraint on packaging by introducing https://pypi.org/project/packaging-legacy/.

@di di requested a review from a team as a code owner April 24, 2023 19:19
@di di merged commit d618c7b into pypi:main Apr 24, 2023
16 checks passed
@di di deleted the fix/12920 branch April 24, 2023 19:51
moto-timo added a commit to moto-timo/layerindex-web that referenced this pull request Jan 23, 2024
Since we are only using parse_version for comparison (typically checking
that we are greater than some minimum version for tool or package), one
would think we can use packaging.version.parse as if it was parse_version

Unfortunately, this requires conforming to PEP-440 version definitions,
which does not work for e.g. autotools (2.72d) nor older openssl (1.1.1p).
We rely in these (and to be sure other) cases on the LegacyVersion behavior.

https://packaging.python.org/en/latest/specifications/version-specifiers/#summary-of-differences-from-pkg-resources-parse-version

"This specification purposely restricts the syntax which constitutes a
valid version while pkg_resources.parse_version attempts to provide some
meaning from any arbitrary string."

In order to have the least impact to the overall code, we instead add
packaging_legacy to requirements.txt and use packaging_legacy.version.parse
as if it was parse_version.

https://pypi.org/project/packaging-legacy/
pypa/packaging#407

Since pypi.org itself is depending on packaging_legacy (in fact, a pypi dev
developed the package), we can expect it to be supported for quite some time.

pypi/warehouse#13500

[YOCTO #15348]

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unpin constraint on packaging
2 participants