Support Metadata 2.4 and 2.5, update vendored 'packaging' to 26.0#28
Merged
Conversation
jameslamb
force-pushed
the
wheel-metadata-2.4
branch
from
February 5, 2026 19:39
2162f4c to
fd82dd3
Compare
jameslamb
force-pushed
the
wheel-metadata-2.4
branch
from
February 5, 2026 19:40
fd82dd3 to
77b941b
Compare
jameslamb
marked this pull request as ready for review
February 5, 2026 19:48
jameslamb
commented
Feb 5, 2026
| assert "Name" in parsed, "Must have a distribution name" | ||
| assert "Version" in parsed, "Must have a version" | ||
|
|
||
| # 'License' was deprecated in Metadata Version 2.4 (PEP 639) |
Member
Author
There was a problem hiding this comment.
This file is the only Python code I manually changed, just calling it out so it isn't lost in the diff.
At https://packaging.python.org/en/latest/specifications/core-metadata/#license it says:
License
Deprecated since version 2.4: in favour of License-Expression.
dstufft
approved these changes
Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In response to loud deprecation warnings from
setuptools, RAPIDS projects recently all switched to PEP 639 license metadata, which bumps their wheel Metadata-Version to 2.4 (ref: rapidsai/build-planning#152).Stubs currently can't be built from those wheels, because this project does not support wheel Metadata-Version beyond 2.3.
This fixes that, with the following:
packagingfrom 24.1 to 26.0assert_valid_metadata()to allow for wheels that haveLicense-Expressionbut notLicense(Licensewas deprecated beginning with Metadata-Version 2.4)Notes for Reviewers
How I updated
packaging0 manual changes were made in
_vendor/. Updatedpackagingto 26.0 (its latest version) like this:How I tested this
Followed the instructions in the README, using a wheel I know this project failed to produce an
sdistfor.testing code (example)
On
main, this fails in the same way we observed in internal pipelines building awheel-stubsdist:On this branch, it succeeds
Also ran all the tests