warehouse icon indicating copy to clipboard operation
warehouse copied to clipboard

Include admonition about deprecated license classifiers on `/classifiers`

Open ByteB4rb1e opened this issue 8 months ago • 5 comments

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.

ByteB4rb1e avatar Mar 29 '25 20:03 ByteB4rb1e

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

di avatar Mar 31 '25 13:03 di

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.

ByteB4rb1e avatar Mar 31 '25 13:03 ByteB4rb1e

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.

di avatar Mar 31 '25 13:03 di

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 avatar Apr 14 '25 15:04 kumar-reddy-kunchala

@kumar-reddy-kunchala Please do!

di avatar Apr 14 '25 15:04 di