Drop the deprecated license classifier - #1003
Open
Kayvan-Zahiri wants to merge 2 commits into
Open
Conversation
Kayvan-Zahiri
requested review from
joe-clickhouse and
peter-leonov-ch
as code owners
August 24, 2026 19:41
setuptools 77 deprecated License :: OSI Approved :: * in favour of the PEP 639 SPDX expression, which setup.py already carries as license="Apache-2.0". Removing the classifier leaves the built metadata with License: Apache-2.0 and License-File: LICENSE, so nothing is lost. The build now needs setuptools>=77.0.3 for that field to be read as an SPDX expression rather than free text. Also removed tests_require, which setuptools reports as an unknown distribution option and ignores. Closes ClickHouse#996
Kayvan-Zahiri
force-pushed
the
chore/996-spdx-license
branch
from
August 24, 2026 23:20
1c7f18d to
1cace18
Compare
Contributor
There was a problem hiding this comment.
Thanks. I'm good with this, but will reqeust one fix before merge.
license="Apache-2.0" is not read as SPDX by any setuptools release. It still emits the deprecated free text License: field, which your before and after output shows. Setuptools writes License-Expression: only from the license_expression attribute.
Please make these changes:
- In
setup.py, replacelicense="Apache-2.0"withlicense_expression="Apache-2.0" - Keep the classifier deletion and the
setuptools>=77.0.3floor. Both are required with this change - Reword the changelog entry and PR description. Setuptools does not reinterpret
license=as an SPDX expression. The accurate statement is that the package now declares its license with the PEP 639license_expressionfield.
The result should build with no warnings and emit License-Expression: Apache-2.0 plus License-File: LICENSE.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #996.
setuptools 77 deprecated
License :: OSI Approved :: *in favour of the PEP 639SPDX expression.
setup.pyalready carrieslicense="Apache-2.0", so theclassifier is the only thing producing the warning.
Built metadata before and after, from
setup.py egg_info:Nothing is lost: the SPDX expression and the bundled LICENSE both survive.
build-system.requiresmoves tosetuptools>=77.0.3, which is the release thatreads
licenseas an SPDX expression. Without the floor, an older setuptoolswould treat it as free text and the classifier removal would cost real metadata.
Also removed
tests_require, which the same build reports asUserWarning: Unknown distribution option: 'tests_require'and ignores. Happy tosplit that into its own PR if you would rather keep this to the license change.
Verified with setuptools 84.0.0: both warnings are gone and
pytest tests/unit_testsis unchanged at 1444 passing.