Skip to content

Include admonition about deprecated license classifiers on /classifiers #17868

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

Open
ByteB4rb1e opened this issue Mar 29, 2025 · 5 comments
Open
Labels
documentation good first issue This issue is ideal for first-time contributors!

Comments

@ByteB4rb1e
Copy link

ByteB4rb1e commented Mar 29, 2025

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 ByteB4rb1e added feature request requires triaging maintainers need to do initial inspection of issue labels Mar 29, 2025
@di
Copy link
Member

di commented Mar 31, 2025

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

@ByteB4rb1e
Copy link
Author

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.

@di di changed the title Deprecation notice for trove license classifiers Include admonition about deprecated license classifiers on /classifiers Mar 31, 2025
@di di added good first issue This issue is ideal for first-time contributors! documentation and removed feature request requires triaging maintainers need to do initial inspection of issue labels Mar 31, 2025
@di
Copy link
Member

di commented Mar 31, 2025

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.

@kumar-reddy-kunchala
Copy link

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?

@di
Copy link
Member

di commented Apr 14, 2025

@kumar-reddy-kunchala Please do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation good first issue This issue is ideal for first-time contributors!
Projects
None yet
Development

No branches or pull requests

3 participants