warehouse
warehouse copied to clipboard
Include admonition about deprecated license classifiers on `/classifiers`
What's the problem this feature will solve?
While upgrading the build package to 1.2.2.post1, I've stumbled upon a deprecation notice on Trove license classifiers in pyproject.toml, however there is no mention on this on the respective pypi.org documentation site. I missed the PEP-639 introduction, hence was briefly confused.
Describe the solution you'd like
I would suggest adding an admonition referencing PEP-639, or at least mentioning the changes as documented in https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#classifiers
Additional context
I wasn't sure which issue tracker pypi.org is using, so opening a feature request here is just a guess. I hope this is ok.
Hi, can you provide more details? The exact command you ran and the output you saw would be helpful.
The build tool is just a build frontend that could use any number of build backends (like setuptools, flit, etc). The deprecation notice you got probably came from your build backend.
The Packaging user guide does explain how to use the new PEP 639 fields: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license-and-license-files
I understand. I didn't mean the specifics of the build package, this was just mentioned for context, as the deprecation notice was caused by my own pyproject.toml.
Regardless, here is the notice:
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
When authoring pyproject.toml, my intuition is to consult the PyPi documentation on Trove classifiers. With the deprecation notice, I assumed I choose a wrong classifier for the license. After changing the license classifier and that did not help, I read the deprecation notice more thoroughly and saw the reference to the packaging guide. That's how it should be, my fault to begin with.
Though I think it would be great for consistency to let https://pypi.org/classifiers/ have an admonition on license classifier deprecation. That way, if someone used https://pypi.org/classifiers/ as an entrypoint, they know right away not to use the license classifiers. This may help with the overall awarerness towards PEP-639.
as the deprecation notice was caused by my own pyproject.toml.
Correct, this warning is coming from setuptools: https://github.com/pypa/setuptools/blob/6ead555c5fb29bc57fe6105b1bffc163f56fd558/setuptools/dist.py#L439-L447
Though I think it would be great for consistency to let https://pypi.org/classifiers/ have an admonition on license classifier deprecation. That way, if someone used https://pypi.org/classifiers/ as an entrypoint, they know right away not to use the license classifiers. This may help with the overall awarerness towards PEP-639.
I think that makes sense, and that it should also link to https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#licens just like the warning you shared. I've renamed this issue and added the "Documentation" and "Good First Issue" label to it.
Hi, I’m interested in working on this issue as a part of GSoC 2025. I’ve worked with Flask and MongoDB and would love to contribute. Can I take this up?
@kumar-reddy-kunchala Please do!