Skip to content

Declare the MIT license as an SPDX expression - #17

Merged
mikkel merged 1 commit into
mainfrom
cursor/setuptools-license-metadata-16f8
Oct 17, 2026
Merged

mikkel merged 1 commit into
mainfrom
cursor/setuptools-license-metadata-16f8

Conversation

@mikkel

@mikkel mikkel commented Oct 16, 2026

Copy link
Copy Markdown
Member

Summary

python -m build with current setuptools (84.0.0) warned that the project.license table and the License :: OSI Approved :: MIT License classifier are deprecated and unsupported after 2027-02-18.

pyproject.toml now uses the current form:

  • license = "MIT" (SPDX license expression)
  • license-files = ["LICENSE.txt"]
  • the License classifier is removed
  • the build backend requirement is setuptools>=77, the first release that accepts those fields

Version stays 0.9.3. Nothing is published.

Build output before

python -m build succeeded, but setuptools printed these warnings while building both the sdist and the wheel (the classifier warning twice per phase):

WARNING `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 2027-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.
        ********************************************************************************

!!
WARNING License classifiers are deprecated.
!!

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

        License :: OSI Approved :: MIT License

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

!!
Successfully built patchling-0.9.3.tar.gz and patchling-0.9.3-py3-none-any.whl

Build dependencies in that run: setuptools==84.0.0, wheel==0.48.0.

Build output after

Same command, same setuptools and wheel. No setuptools license warnings. The only WARNING line is from the build frontend itself (Both NO_COLOR and FORCE_COLOR environment variables are set, disabling color), which is unrelated to packaging metadata.

* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - setuptools>=77
  - wheel
* Getting build dependencies for sdist...
running egg_info
...
adding license file 'LICENSE.txt'
...
* Installed build dependency versions:
  - setuptools==84.0.0
  - wheel==0.48.0
* Building sdist...
...
* Building wheel from sdist
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - setuptools>=77
  - wheel
...
* Installed build dependency versions:
  - setuptools==84.0.0
  - wheel==0.48.0
* Building wheel...
...
adding 'patchling-0.9.3.dist-info/licenses/LICENSE.txt'
adding 'patchling-0.9.3.dist-info/METADATA'
...
Successfully built patchling-0.9.3.tar.gz and patchling-0.9.3-py3-none-any.whl

twine check dist/*:

Checking dist/patchling-0.9.3-py3-none-any.whl: PASSED
Checking dist/patchling-0.9.3.tar.gz: PASSED

METADATA diff

Compared the rebuilt wheel with the published patchling 0.9.3 wheel (patchling-0.9.3-py3-none-any.whl). The license is still MIT. PEP 639 records it as License-Expression instead of the deprecated License field plus License classifier. License-File: LICENSE.txt is unchanged, the packaged LICENSE.txt bytes match (sha256 cc2264ef2518a4c8c5be58a98b574ab5a96317c59d6763404a77416186d4f016), and the description body is identical.

--- pypi-patchling-0.9.3 METADATA
+++ rebuilt-patchling-0.9.3 METADATA
@@ -3,14 +3,13 @@
 Version: 0.9.3
 Summary: Natural-language code transformation as a library: generate unified diffs with LLMs and apply them resiliently with smartapply. Formerly gptdiff.
 Author: 255labs
-License: MIT
+License-Expression: MIT
 Project-URL: Homepage, https://github.com/255BITS/patchling-py
 Project-URL: Documentation, https://255bits.github.io/patchling-py
 Project-URL: Source, https://github.com/255BITS/patchling-py
 Project-URL: Browser/Node runtime (npm), https://www.npmjs.com/package/patchling
 Project-URL: Built with patchling (nanoodle), https://nanoodle.com
 Keywords: patchling,smartapply,llm,diff,unified-diff,patch,code-transformation,ai,codegen,gptdiff
-Classifier: License :: OSI Approved :: MIT License
 Classifier: Programming Language :: Python :: 3
 Classifier: Operating System :: OS Independent
 Requires-Python: >=3.10

Tests

Offline suite, with LIVE_LLM and LLM/NanoGPT API keys unset. Live tests skipped:

195 passed, 2 skipped in 4.40s
SKIPPED tests/test_live_llm.py: live LLM tests are opt-in; set LIVE_LLM=1 and GPTDIFF_LLM_API_KEY
SKIPPED tests/test_relevance_live.py: set LIVE_LLM=1 to call the live LLM
Open in Web Open in Cursor 

setuptools warns that a license table and License classifiers are
deprecated and unsupported after 2027-02-18. Record license = "MIT"
and license-files, drop the classifier, and require setuptools>=77.
Version stays 0.9.3.

Co-authored-by: mikkel <mikkel@255bits.com>
@mikkel
mikkel marked this pull request as ready for review October 17, 2026 16:34
@mikkel
mikkel merged commit 533749a into main Oct 17, 2026
2 checks passed
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.

2 participants