Closed jaraco closed 2 months ago
Would it make sense to put the data that is being requested into the pyproject.toml
file?
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)
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: metadata["Project-URL"]
Tests are failing for other reasons. I'm merging this to get the fix out ASAP.
Tests are failing for other reasons. I'm merging this to get the fix out ASAP.
Should use get
with a default value of an empty string. The type checking CI is failing due to that.
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 metadata["Project-URL"]["Homepage"]
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 also believe it's the wrong solution and my recommendation would be to remove this boilerplate and let users call importlib metadata
themselves. However, this PR aims to address narrowly the deprecation warning and emergent failure without making other changes to the logic.
I think it's
metadata["Project-URL"]["Homepage"]
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.
I think it's
metadata["Project-URL"]["Homepage"]
Sadly no ☹️
But can do: metadata.get_all("Project-URL")
which gets a list, containing sort of comma-separated values.
[
"Homepage, https://twine.readthedocs.io/",
"Source, https://github.com/pypa/twine/",
...
]
The easiest fix would be to just hard-code the value until a more elegant fix can happen. IMHO.
The easiest fix would be to just hard-code the value until a more elegant fix can happen. IMHO.
I did that in: https://github.com/pypa/twine/pull/1127
We're preferring the first submission in #1115 to this approach.
Closes #977