Skip to content

project.license as a TOML table / license classifiers are deprecated #417

@llucax

Description

@llucax

What's needed?

We need to stop using the deprecated license = { text = "MIT" } and the "License :: ..." classifier.

Proposed solution

  1. Use license = "MIT" instead, or license = "LicenseRef-Proprietary" for proprietary.
  2. Remove "License :: OSI Approved :: MIT License"
  • Update cookiecutter template
  • Create migration step in the migration script

Use cases

No response

Alternatives and workarounds

No response

Additional context

Errors

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.
        ********************************************************************************
setuptools.errors.InvalidConfigError: License classifiers have been superseded by license expressions (see https://peps.python.org/pep-0639/). Please remove:

License :: OSI Approved :: MIT License

More info

Metadata

Metadata

Assignees

No one assigned

    Labels

    part:templateAffects the cookiecutter template filestype:enhancementNew feature or enhancement visitble to users

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions