-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[FR] Remove License classifier warning #4938
Comments
Hi @gotmax23 thank you very much for reaching out. The thing is: this is not something that setuptools can do by itself. License classifiers have been deprecated as a whole in the ecosystem, so in the future other tools may start to fail (e.g. PyPI or pip). It does not matter if the classifiers are coming from The deprecation of classifiers was introduced via PEP 639 (which was not championed by setuptools itself, we are merely following the standard). The possible action point is to remove the classifier regardless if it comes from I understand the frustration with license expressions, because setuptools itself also has a problem to calculate and maintain the a compound SPDX expression, considering all the bundled source code. What I am personally considering to do is to make sure all license files are included in the distribution and then remove the deprecated classifiers without adding an SPDX expression. I consider SPDX expressions nice to have, but at the end of the day they are (at best) proxies to the license files. License files are ultimately the source of truth, and what is usually required to be present in distributions. I suppose it is also possible to include another file (e.g. |
Thank you for your detailed response! I understand that license classifiers are deprecated in the ecosystem (although it seems unlikely that pip will refuse to install packages because of this), but perhaps setuptools raising deprecation warnings is not the right place to do that. PEP 639 says:
(https://peps.python.org/pep-0639/#deprecate-license-classifiers), so the PEP does not require that setuptools prints this warnings in this case. In any case, I understand setuptools' desire to warn users about the deprecation. It's just the other maintainer of ansible's build scripts and I thought these warnings were a bit premature when License-Expression was only just introduced, and we were hesitant to remove metadata from our packaging, so I thought I'd reach out. It just seems to me that setuptools is deprecating very many things as of late. |
Thank you very much @gotmax23 for the understanding.
That is a good assessment. The PEP only says that setuptools may issue the warning. I agree that it is unlikely In the case of setuptools, and why we addopted the "may": I think that it is better to raise awareness earlier rather than later, so that at least the users are informed of what is happening in the ecossytem. We have not introduced any due date for the warning, so it is unlikely this is going to evolve into an exception any time soon. Before we completely remove the functionality, there will be a clear indication of when it is going to be removed.
Thank you for reaching out. I understand (we are going through some similar concerns right now particularly when it comes to license expressions). Maybe it is useful to share the concerns in https://discuss.python.org/c/packaging/14. Regarding the frequency of the deprecations: some of them are organic and come from setuptools itself, others come from distutils, others are driven from the standardisation (like this one) and others are indirect unfolding from standardisation and responses to the changes in the ecosystem (e.g. deprecation of The implementation of PEP 639 did introduce a lot of new deprecation warnings. However most of them were supposed to be hard exceptions in the text of the PEP, so we softened them up by introducing a deprecation period. (Not this deprecation in particular, this deprecation message was a "MAY", so not fundamentally required, but still a recommendation from the PEP). In all fairness there are a lot of deprecation warnings that are actually old. What we are doing lately is 1. increase awareness (making them more verbose and prominent as suggested by the community) and 2. actually see through the deprecation periods and use the opportunity to simplify setuptools. |
It has been suggested that we concentrate releases instead of following the release process described in https://setuptools.pypa.io/en/latest/development/releases.html. I don't believe setuptools is in a position to do that. We don't have enough dedicated people to afford moving to a fixed release calendar or accumulate changes over a long period of time. Given that we use this "release frequent, release small" process, it does happen that deprecations are scattered in time. |
What's the problem this feature will solve?
setuptools v77.0.0 now prints a large deprecation warning when using
License::
classifiers, even if the newlicense
key in pyproject.toml is not used. This presents a problem for ansible. We can't adopt the new standard, as we don't store configuration in pyproject.toml (we use setup.cfg) and do not maintain a cumulative SPDX license expression that encompasses the additional GPL-compatible licenses present in the 80+ Ansible collections included in the ansible package, so we could not add an accuratelicense
key (GPL-3.0-or-later
by itself would be incomplete) even if we wanted to move our configuration. Printing this loud warning is unhelpful to us.Describe the solution you'd like
Please consider removing this deprecation warning or maybe only raising it when configuration is sourced from pyproject.toml. It's not actionable and creates backwards compatibility issues.
Alternative Solutions
Removing the classifiers and not moving our config to pyproject.toml, but this would result in an overall loss in license metadata
Additional context
Thank you for working on setuptools!
Code of Conduct
The text was updated successfully, but these errors were encountered: