Skip to content

Switch to PEP 639 license metadata #325

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

Merged
merged 1 commit into from
Apr 29, 2025
Merged

Conversation

bgilbert
Copy link
Member

Conform with PEP 639 by adding links to our license files, using a SPDX license expression to declare our licenses, and dropping the deprecated license Trove classifier.

The new syntax for project.license requires setuptools ≥ 77, so this change breaks compatibility with setuptools 61-76. Users installing from source will be unaffected because the build frontend automatically updates setuptools if required, but Linux distro packaging disallows such updates, so this change breaks package builds for many current distro versions, including all stable versions of Debian, Fedora, and Ubuntu as well as Debian testing.

setuptools' deprecation warning claims that the old syntax will be removed on 2026-Feb-18. If setuptools sticks to this plan, they will cause ecosystem-wide packaging disruption. I intend to maintain the status quo as long as possible in the hope that PyPA opts to extend the deprecation period. If they do not, and setuptools drops support for the old syntax (and does not reinstate it within a few weeks), we'll probably need to drop the license fields for a few years until distros with setuptools < 77 reach EOL.

@openslide-bot
Copy link
Member

openslide-bot commented Apr 26, 2025

DCO signed off ✔️

All commits have been signed off. You have certified to the terms of the Developer Certificate of Origin, version 1.1. In particular, you certify that this contribution has not been developed using information obtained under a non-disclosure agreement or other license terms that forbid you from contributing it under the GNU Lesser General Public License, version 2.1.

@bgilbert
Copy link
Member Author

Without this change, source builds throw some aggressive warnings:

/tmp/build-env-gld0oman/lib64/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
!!

        ********************************************************************************
        Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).

        By 2026-Feb-18, you need to update your project and remove deprecated calls
        or your builds will no longer be supported.

        See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
        ********************************************************************************

!!
/tmp/build-env-gld0oman/lib64/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

        ********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX license expression:

        License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)

        See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
        ********************************************************************************

!!

We could fix the second warning without compatibility issues, but still: I'm not excited about carrying these warnings for a year, nor am I excited about a protracted battle with PyPA. Since this issue isn't user-facing, I'm now considering merging the changes as-is. Downstream packagers with setuptools < 77 would be impacted, but the issue won't be unique to OpenSlide Python, and packagers can work around it by patching out the project.license field and widening the setuptools version constraint.

@bgilbert bgilbert changed the title DNM: switch to PEP 639 license metadata Switch to PEP 639 license metadata Apr 26, 2025
@bgilbert bgilbert force-pushed the pep639 branch 2 times, most recently from 5718074 to d873500 Compare April 28, 2025 14:12
@bgilbert bgilbert marked this pull request as ready for review April 28, 2025 14:23
Conform with PEP 639 by adding links to our license files, using a SPDX
license expression to declare our licenses, and dropping the deprecated
Trove license classifier.

Without this change, setuptools shows a large deprecation warning saying
that support for the old project.license syntax will be removed on
2026-Feb-18.  However, the new syntax requires setuptools >= 77, so this
change breaks compatibility with setuptools 61-76.  Users installing from
source will be unaffected because the build frontend automatically updates
setuptools if required, but Linux distro packaging disallows such updates,
so this change will break package builds for many still-supported distro
releases.

To build with setuptools 61 through 76, distros will need to patch out the
project.license field and reduce the build-system.requires dependency.

Signed-off-by: Benjamin Gilbert <bgilbert@cs.cmu.edu>
@bgilbert bgilbert enabled auto-merge April 29, 2025 02:54
@bgilbert bgilbert merged commit 07fa787 into openslide:main Apr 29, 2025
45 checks passed
@bgilbert bgilbert deleted the pep639 branch April 29, 2025 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy