Skip to content

Drop the deprecated license classifier - #1003

Open
Kayvan-Zahiri wants to merge 2 commits into
ClickHouse:mainfrom
Kayvan-Zahiri:chore/996-spdx-license
Open

Drop the deprecated license classifier#1003
Kayvan-Zahiri wants to merge 2 commits into
ClickHouse:mainfrom
Kayvan-Zahiri:chore/996-spdx-license

Conversation

@Kayvan-Zahiri

Copy link
Copy Markdown

Closes #996.

setuptools 77 deprecated License :: OSI Approved :: * in favour of the PEP 639
SPDX expression. setup.py already carries license="Apache-2.0", so the
classifier is the only thing producing the warning.

Built metadata before and after, from setup.py egg_info:

  before                                                    after
  Metadata-Version: 2.4                                     Metadata-Version: 2.4
  License: Apache-2.0                                       License: Apache-2.0
  Classifier: License :: OSI Approved :: Apache Software    (removed)
  License-File: LICENSE                                     License-File: LICENSE

Nothing is lost: the SPDX expression and the bundled LICENSE both survive.

build-system.requires moves to setuptools>=77.0.3, which is the release that
reads license as an SPDX expression. Without the floor, an older setuptools
would treat it as free text and the classifier removal would cost real metadata.

Also removed tests_require, which the same build reports as
UserWarning: Unknown distribution option: 'tests_require' and ignores. Happy to
split 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_tests is unchanged at 1444 passing.

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
Kayvan-Zahiri force-pushed the chore/996-spdx-license branch from 1c7f18d to 1cace18 Compare August 24, 2026 23:20

@joe-clickhouse joe-clickhouse left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. In setup.py, replace license="Apache-2.0" with license_expression="Apache-2.0"
  2. Keep the classifier deletion and the setuptools>=77.0.3 floor. Both are required with this change
  3. 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 639 license_expression field.

The result should build with no warnings and emit License-Expression: Apache-2.0 plus License-File: LICENSE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor deprecated license classifier

2 participants