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

Add support for Metadata 2.2 #2293

Merged
merged 2 commits into from
Mar 8, 2024
Merged

Add support for Metadata 2.2 #2293

merged 2 commits into from
Mar 8, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Mar 8, 2024

Summary

PyPI now supports Metadata 2.2, which means distributions with Metadata 2.2-compliant metadata will start to appear. The upside is that if a source distribution includes a PKG-INFO file with (1) a metadata version of 2.2 or greater, and (2) no dynamic fields (at least, of the fields we rely on), we can read the metadata from the PKG-INFO file directly rather than running any of the PEP 517 build hooks.

Closes #2009.

@charliermarsh
Copy link
Member Author

This works for everything except local, archived distributions. Want to do one refactor on main that should make those "just work" here too.

@charliermarsh charliermarsh force-pushed the charlie/metadata-2.2 branch 2 times, most recently from 12770b1 to acc8f4b Compare March 8, 2024 03:41
@charliermarsh charliermarsh requested a review from konstin March 8, 2024 04:03
@charliermarsh charliermarsh marked this pull request as ready for review March 8, 2024 04:04
@charliermarsh charliermarsh force-pushed the charlie/metadata-2.2 branch from acc8f4b to 3d27f19 Compare March 8, 2024 04:05
@charliermarsh charliermarsh added the enhancement New feature or improvement to existing functionality label Mar 8, 2024
@charliermarsh charliermarsh force-pushed the charlie/metadata-2.2 branch 2 times, most recently from 258283f to c59e8f5 Compare March 8, 2024 04:58
@charliermarsh charliermarsh force-pushed the charlie/metadata-2.2 branch from c59e8f5 to 5d96339 Compare March 8, 2024 04:58
Copy link
Member

@konstin konstin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yesss

@charliermarsh charliermarsh force-pushed the charlie/metadata-2.2 branch from 288a2a9 to 4605e44 Compare March 8, 2024 15:54
@charliermarsh charliermarsh enabled auto-merge (squash) March 8, 2024 15:57
@charliermarsh charliermarsh merged commit 2e9678e into main Mar 8, 2024
7 checks passed
@charliermarsh charliermarsh deleted the charlie/metadata-2.2 branch March 8, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Metadata 2.2+ for source distributions
2 participants