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

Use a pkginfo that supports 2.4 metadata #679

Merged
merged 3 commits into from
Jan 13, 2025
Merged

Use a pkginfo that supports 2.4 metadata #679

merged 3 commits into from
Jan 13, 2025

Conversation

twm
Copy link
Contributor

@twm twm commented Jan 11, 2025

Description

Require pkginfo>=1.12.0, which supports metadata 2.4. This allows Twine to work with packages generated by the latest hatchling. Refer to #678.

Also bump build-and-inspect-python-package to v2.11.0 for the same reason.

Checklist

  • Make sure changes are covered by existing or new tests.
  • For at least one Python version, make sure test pass on your local environment.
  • Create a file in src/towncrier/newsfragments/. Briefly describe your
    changes, with information useful to end users. Your change will be included in the public release notes.
  • Make sure all GitHub Actions checks are green (they are automatically checking all of the above).
  • Ensure docs/tutorial.rst is still up-to-date.
  • If you add new CLI arguments (or change the meaning of existing ones), make sure docs/cli.rst reflects those changes.
  • If you add new configuration options (or change the meaning of existing ones), make sure docs/configuration.rst reflects those changes.

This allows Twine to work with packages generated by the latest
hatchling.
@twm twm requested a review from a team as a code owner January 11, 2025 20:47
Copy link
Member

@glyph glyph left a comment

Choose a reason for hiding this comment

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

Yay?

@hynek
Copy link
Member

hynek commented Jan 12, 2025

You have to keep in mind that while the wheel is correct, Twine 6.0.1 will not upload licensing metadata (c.f. attrs's issue tracker & 329509342875 PRs around this). Since Towncrier has a license trove classifier, that might be mostly OK, but the metadata as it stands will not be uploaded until Twine ships a release with pypa/twine#1180

Copy link
Member

@adiroiban adiroiban left a comment

Choose a reason for hiding this comment

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

It look good. Thanks.

I guess that we need to trigger a new release to actually test this.

@@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling<1.27.0"]
requires = ["hatchling"]
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add this to the metadata.

If someone will try to run python -m build with an older pkginfo, I expect they will get an error.

Suggested change
requires = ["hatchling"]
requires = ["hatchling", "pkginfo>=1.12.0"]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It actually builds fine without this — it is twine choking because of an old pkginfo.

@twm
Copy link
Contributor Author

twm commented Jan 13, 2025

You have to keep in mind that while the wheel is correct, Twine 6.0.1 will not upload licensing metadata (c.f. attrs's issue tracker & 329509342875 PRs around this). Since Towncrier has a license trove classifier, that might be mostly OK, but the metadata as it stands will not be uploaded until Twine ships a release with pypa/twine#1180

That's interesting, thanks for the explanation. I don't think that doing a release without this metadata is a blocker, though, since no prior release has had it either.

@twm twm merged commit fffc5a9 into trunk Jan 13, 2025
16 checks passed
@twm twm deleted the metadata-2.4 branch January 13, 2025 04:35
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.

4 participants