Skip to content

Upgrade to new license specifications.#2399

Open
jwieleRH wants to merge 1 commit into
containers:mainfrom
jwieleRH:spdx
Open

Upgrade to new license specifications.#2399
jwieleRH wants to merge 1 commit into
containers:mainfrom
jwieleRH:spdx

Conversation

@jwieleRH
Copy link
Copy Markdown
Collaborator

@jwieleRH jwieleRH commented Feb 5, 2026

As of setuptools version 77.0.0, project.license as a TOML table is deprecated. The new license representation is project.license, a valid SPDX license expression consisting of one or more license identifiers and project.license-files, a list of license files. See: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license.

Remove License classifier: License classifiers have been superseded by license expressions (see https://peps.python.org/pep-0639/). PyPI.org still recognizes license classifiers as search terms, but tools that enforce compliance with PEP-639 balk.

Remove [tool.setuptools] license-files. It is redundant.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @jwieleRH, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request modernizes the project's pyproject.toml configuration to align with the latest Python packaging standards, specifically regarding license declaration. It updates the setuptools dependency, adopts the new license specification format, removes deprecated license classifiers, and cleans up redundant license file declarations. The changes ensure compliance with PEP-0639 and improve compatibility with current packaging tools.

Highlights

  • Dependency Update: The setuptools dependency in build-system.requires has been updated to setuptools>=77.0.0 to ensure compatibility with the new license specification features.
  • License Specification Modernization: The project's license definition in pyproject.toml has been updated from the deprecated [project.license] text = "MIT" table format to the new license = "MIT" key, accompanied by license-files = ["LICENSE"], aligning with modern Python packaging standards.
  • Deprecated License Classifier Removal: The License :: OSI Approved :: MIT License classifier has been removed from the project.classifiers section, as license classifiers are now superseded by license expressions per PEP-0639.
  • Redundant Configuration Cleanup: The license-files = ["LICENSE"] entry under [tool.setuptools] has been removed, as this information is now specified directly under the [project] section, making the tool.setuptools entry redundant.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • pyproject.toml
    • Updated setuptools dependency to >=77.0.0.
    • Removed the deprecated License :: OSI Approved :: MIT License classifier.
    • Migrated license declaration from [project.license] text = "MIT" to project.license = "MIT" and project.license-files = ["LICENSE"].
    • Removed redundant license-files entry from [tool.setuptools].
Activity
  • No specific activity (comments, reviews, or progress updates) has been recorded for this pull request since its creation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly updates the project's license specification in pyproject.toml to align with the latest standards from setuptools (version 77.0.0 and newer). The changes include adopting the SPDX license expression in the [project] table, removing the deprecated [project.license] table and the redundant License classifier, and cleaning up the [tool.setuptools] section. The required setuptools version is also appropriately updated. The changes are clear, well-motivated, and correctly implemented. I have no further suggestions for improvement.

Comment thread pyproject.toml Outdated
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools"]
requires = ["setuptools>=77.0.0"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Will this cause issues for installing on RHEL9?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Was just about to ask that...

There are other issues to address for el9 though. If this works on el10 I think we could patch it for rpm builds on el9.

Is this deprecated and scheduled for removal, or just a deprecated warning?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does not work on el10:

No matching package to install: 'python3dist(setuptools) >= 77'
Not all dependencies satisfied
Error: Some packages could not be found.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

PRETTY_NAME="Red Hat Enterprise Linux 9.7 (Plow)"
ERROR: Package 'ramalama' requires a different Python: 3.9.25 not in '>=3.10'
RHEL9.7 appears to have Python 3.9.25 while RamaLama requires Python 3.10 so that ship may have sailed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can install Python3.11 I believe on RHEL.

Copy link
Copy Markdown
Collaborator

@olliewalsh olliewalsh Feb 5, 2026

Choose a reason for hiding this comment

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

You can install Python3.11 I believe on RHEL.

on el9? yes, 3.12 rpm is available too. However in both cases the dependencies we require are not packaged (nor are they in EPEL)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Well Red Hat really needs RamaLama to work on RHEL10, and would be nice to work on RHEL9, if there is a way to hack around this in the Spec file, then I am fine with the change.

@jwieleRH
Copy link
Copy Markdown
Collaborator Author

From the log of "make pypi-build":
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.

@olliewalsh
Copy link
Copy Markdown
Collaborator

olliewalsh commented Feb 10, 2026 via email

@olliewalsh
Copy link
Copy Markdown
Collaborator

In the meantime let's just watch pypa/setuptools#4903

project.license as a TOML table is deprecated. The new license
representation is project.license, a valid SPDX license expression
consisting of one or more license identifiers and
project.license-files, a list of license files.  See:
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license.

Remove License classifier: License classifiers have been superseded by
license expressions (see https://peps.python.org/pep-0639/). PyPI.org
still recognizes license classifiers as search terms, but tools that
enforce compliance with PEP-639 balk.

Remove [tool.setuptools] license-files. It is redundant.

Signed-off-by: John Wiele <jwiele@redhat.com>
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.

3 participants