Add check that Deprecated Trove classifiers are not used.#553
Add check that Deprecated Trove classifiers are not used.#553henryiii merged 3 commits intoscientific-python:mainfrom
Conversation
|
All the backends we support have not implemented support yet. Scikit-build-core will support it soon (in main, release in <1 week), and setuptools, flit-core, and poetry-core I believe all haven't added support yet1. The official guidelines updated, and this caused issues, now there are warnings for these backends. pypa/packaging.python.org#1806 However, we can check to see if Footnotes
|
| """ | ||
| match pyproject: | ||
| case {"project": {"classifiers": classifiers}}: | ||
| return len([c for c in classifiers if c.startswith("License ::")]) == 0 |
There was a problem hiding this comment.
This should be guarded by a check for project.license being a string. If it's a string, this check is valid. If not, then METADATA<2.4 is probably being used. You can see the full logic following the PEP in pyproject-metadata.
We could possibly even do this by backend, we compute that too.
| url = mk_url("packaging-simple") | ||
|
|
||
| @staticmethod | ||
| def check(pyproject: dict[str, Any], package: Traversable) -> bool | None: |
There was a problem hiding this comment.
These are like pytest fixtures, you don't need ones you don't use. :)
|
If you don't mind, I can probably update this. |
|
Feel free to push in it, and I believe flit support for this was added and released today. I sent this before forgetting. |
|
Nice, good to see, though odd that it only supports a single license. |
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
|
thanks ! |
It should be fairly self explanatory.
I think maybe we can now recommand License-Expression in favor of License when possible.