Skip to content

Use PEP 639 license-files in pyproject.toml#12544

Open
fecet wants to merge 2 commits intoComfy-Org:masterfrom
fecet:fix/pep639-license
Open

Use PEP 639 license-files in pyproject.toml#12544
fecet wants to merge 2 commits intoComfy-Org:masterfrom
fecet:fix/pep639-license

Conversation

@fecet
Copy link
Copy Markdown

@fecet fecet commented Feb 20, 2026

Summary

  • Replace deprecated license = { file = "LICENSE" } with license-files = ["LICENSE"] (PEP 639)

Motivation

PEP 639 deprecates the table-based license field. The old { file = "..." } format causes issues with tools that expect machine-readable SPDX identifiers (e.g. pixi-build-python).

This PR only migrates the file reference syntax. The SPDX license identifier is left for maintainers to decide if/when needed.

Test plan

  • No functional change, only metadata format update

Replace deprecated `license = { file = "LICENSE" }` with PEP 639
SPDX expression format. The old table-based license field is
deprecated per PEP 639 and causes issues with tools that expect
machine-readable SPDX identifiers (e.g. conda build backends).

Ref: https://peps.python.org/pep-0639/#deprecate-license-field
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d2384ced6b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread pyproject.toml Outdated
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 20, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

In pyproject.toml under the [project] section the license declaration was changed from license = { file = "LICENSE" } to license-files = ["LICENSE"]. No other project metadata or structure was modified.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating the license field in pyproject.toml to use PEP 639's license-files format instead of the deprecated table-based syntax.
Description check ✅ Passed The description is directly related to the changeset, explaining the migration from deprecated license syntax to PEP 639 format, including motivation and test plan.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pyproject.toml`:
- Line 5: Update the license identifier in pyproject.toml from "GPL-3.0-only" to
"GPL-3.0-or-later" so it matches the source headers (e.g., files
comfy/controlnet.py, comfy/supported_models_base.py, comfy/utils.py) that state
"either version 3 of the License, or (at your option) any later version"; locate
the license = "..." entry in pyproject.toml and change its value accordingly.
- Around line 5-6: Update the SPDX identifier and add a build-system
requirement: change the project license entry currently set as license =
"GPL-3.0-only" to license = "GPL-3.0-or-later" (the existing license-files =
["LICENSE"] can remain), and add a [build-system] table that pins setuptools to
at least 77 (e.g., requires including "setuptools>=77" and a wheel entry, and
set build-backend to setuptools.build_meta) so PEP 639 features like
project.license and project.license-files are supported.

Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
Leave the SPDX identifier decision to ComfyUI maintainers.
@fecet fecet changed the title Use PEP 639 license format in pyproject.toml Use PEP 639 license-files in pyproject.toml Feb 20, 2026
@comfy-pr-bot
Copy link
Copy Markdown
Member

Test Evidence Check

⚠️ Warning: Visual Documentation Missing

If this PR changes user-facing behavior, visual proof (screen recording or screenshot) is required. PRs without applicable visual documentation may not be reviewed until provided.

You can add it by:

  • GitHub: Drag & drop media directly into the PR description
  • YouTube: Include a link to a short demo

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