Skip to content

SetuptoolsDeprecationWarning: project.license as a TOML table is deprecated #106

@sabonerune

Description

@sabonerune

The following warning is now appearing with Python>3.9, setuptools>77:

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.
********************************************************************************
SetuptoolsDeprecationWarning: 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.
********************************************************************************

This warning does not require any immediate action.
However, if you leave it as it is, you will not be able to upload it to pypi in the future.

We need to fix this in the future, but it won't be easy for the following reasons:

  • The handling of license and license_file has changed.
    https://packaging.python.org/en/latest/guides/licensing-examples-and-user-scenarios/
    As opposed to the traditional string and classifiers expressions, you can now include third-party license expressions and license files.
    pyopenjtalk vendors OpenJTalk, HTS Engine API, and Mai, and also downloads the OpenJTalk dictionary later.
    You need to decide which licenses to include and how to place the license files.

    I'm not familiar with licenses so I can't help with this.

  • setuptools' PEP639 support is from v77 onwards and cannot be built with Python 3.8.
    There are a few ways to fix this:

    1. Drop Python 3.8
      The simplest way.
    2. Processing with setup.py.
      The metadata will be different between 3.8 and other versions.
    3. Switch to another build backend instead of setuptools.
      For example, scikit-build-core supports both Python 3.8 and PEP639.
      This requires a lot of work as the entire project will be built using CMake.
      You will probably also need to modify the CMakeLists.txt in the open_jtalk and hts_Engine_API repositories.

    Once you have decided which one to adopt, you can submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions