-
Notifications
You must be signed in to change notification settings - Fork 308
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
Rely on .get for possibly undefined metadata. #1124
Conversation
Would it make sense to put the data that is being requested into the |
This is a deprecated field, so no. Project URLs has replaced home-page; home-page should not be required! (And you can't put it into a pyproject.toml file, it's not part of PEP 621) |
So looks like can do: |
Tests are failing for other reasons. I'm merging this to get the fix out ASAP. |
Should use |
This repo is secure, so nothing I can do but wait for other maintainers to come by. @sigmavirus24 or @bhrutledge Can you merge and cut a release? |
This is the wrong solution. This is on twine itself, so the metadata shouldn't ever be undefined. Instead, it should pull the correct metadata (from URLs) for this entry. |
I think it's |
I also believe it's the wrong solution and my recommendation would be to remove this boilerplate and let users call |
importlib metadata doesn't provide a high-level interface for the metadata, so it's going to require something like this to get the URL. |
Sadly no But can do:
|
The easiest fix would be to just hard-code the value until a more elegant fix can happen. IMHO. |
I did that in: #1127 |
We're preferring the first submission in #1115 to this approach. |
This fixes an issue with twine version 4.0.2, which depends on the latest version of importlib-metadata (>= 3.6). Consequently, it is impacted by the breaking changes introduced in importlib-metadata version 8.0.0. This issue has been resolved in pypa/twine#1124. Co-authored-by: Jeroen Wellner <[email protected]>
Closes #977