pypa / twine

Utilities for interacting with PyPI
https://twine.readthedocs.io/
Apache License 2.0
1.59k stars 305 forks source link

fix: Retrieve metadata correctly from importlib_metadata #1115

Closed effigies closed 2 months ago

effigies commented 3 months ago

Running twine with PYTHONWARNINGS=error, DeprecationWarnings about missing keys indicate that twine.__uri__ is being set to None. author is also missing from package metadata.

This change iterates over Project-URLs looking for "Homepage", and parses the author and email from Author-Email. The email stdlib module is used for correctness; it is already imported by importlib_metadata, so this does not add to import time.

effigies commented 3 months ago

This seemed straightforward enough to create without a separate issue. Feel free to close if you disagree. If more discussion is needed, I can go back and create an issue.

JohnVillalovos commented 2 months ago

This will fix #977 it seems.