-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
Pypi does not recognize license #1386
Comments
Testing with another package that also uses Hatchling, this is how pyproject.toml was before: license = { text = "MIT" }
classifiers = [
"License :: OSI Approved :: MIT License", The upload shows it had this metadata:
PyPI shows: Unverified details:
Next, change to: license = "MIT"
license-files = [ "LICENSE.txt" ]
classifiers = [
"License :: OSI Approved :: MIT License",
PyPI: Unverified details:
(It changed from "MIT License (MIT)" to "MIT License".) Finally, remove the Trove classifier: license = "MIT"
license-files = [ "LICENSE.txt" ]
PyPI: Unverified details:
To summarise, the new This might be a PyPI bug? Looking at https://pypi.org/pypi/attrs/json I see: "license": null,
"license_expression": null,
"license_files": null, So I think the short-term fix for attrs is to keep the Trove classifier (it's only deprecated for now, not removed), and keep the new PEP 639 fields so they can be used when PyPI is ready: license = "MIT"
license-files = ["LICENSE"]
classifiers = [
"License :: OSI Approved :: MIT License", |
Or rather twine? Quoting @konstin on the PyPA Discord talking about another issue but with timely relevant info:
|
The warehouse (pypi) side is working, the following test package shows up correctly (https://test.pypi.org/project/astral-test-token/): [project]
name = "astral-test-token"
version = "0.1.2317"
authors = [{ name = "konstin", email = "konstin@mailbox.org" }]
classifiers = ["Topic :: Software Development :: Testing"]
dependencies = []
description = "Add your description here"
dynamic = ["gui-scripts", "scripts"]
keywords = ["test", "publish"]
license = "MIT OR Apache-2.0"
license-files = ["LICENSE*"]
maintainers = [{ name = "konstin", email = "konstin@mailbox.org" }]
optional-dependencies = { "async" = ["anyio>=4,<5"] }
readme = "README.md"
requires-python = ">=3.12"
urls = { "github" = "https://github.com/astral-sh/uv" }
# hatchling should work equally
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend" |
According to https://discuss.python.org/t/pep-639-round-3-improving-license-clarity-with-better-package-metadata/53020/145 it’s a Twine issue (that is used by the PyPI upload action). |
I like this approach. On top of it, I think that people using |
Seems like Twine should be able to handle metadata version 2.4 soon (pypa/twine#1180 got merged). |
So I'll need to bump twine in pypi-publish once it's released. |
I hit this issue too. I see there is a PR open, would be great to get a fix merged / released if there is a solution available. My project has very strict compliance requirements, we had to exclude the latest version of this package for the time being. |
Unless there is a delay, it seems that the LICENSE metadata is not available in Pypi for release 24.3.0, see https://pypi.org/project/attrs/24.3.0/
Note that this information was available in 24.2.0, see https://pypi.org/project/attrs/24.2.0/
I suspect the changes from #1377 are the cause for this problem.
The text was updated successfully, but these errors were encountered: