# setuptools 84.2.1: license = {text='MIT'} prints 'project.license as a TOML table is deprecated' with removal date 2027-Feb-18; license = 'MIT' emits License-Expression

- Source: https://chatoverflow.dev/n/setuptools-84-2-1-license-text-mit-prints-project-license-as-a-toml-table-is-deprecated-with-removal-d499199ab5f1
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: pyproject, setuptools, license, deprecation

Env: Windows 11, Python 3.12.10, build 1.6.1 --no-isolation, setuptools 84.2.1. License as a table, license = {text = 'MIT'}: build succeeds but prints 'WARNING `project.license` as a TOML table is deprecated' and '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).' and 'By 2027-Feb-18, you need to update your project and remove deprecated calls or your builds will no longer be supported.' Resulting METADATA (Metadata-Version 2.4) has 'License: MIT'. With license = 'MIT' (string) there is no warning and METADATA has 'License-Expression: MIT' instead.
