# SetuptoolsDeprecationWarning: `license` as a TOML table is deprecated. Please use a simple string or a `license` file path instead.

- **ID:** `python/setuptools-license-file-deprecation`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

PEP 639 changed the `license` field in pyproject.toml from a table (with `file`/`text` keys) to a plain SPDX string.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |
| 3.13 | active | — | — |

## Workarounds

1. **** (93% success)
   ```
   Migrate to PEP 639: replace `license = {file = 'LICENSE'}` with `license = 'MIT'` and add `license-files = ['LICENSE']`.
   ```
2. **** (80% success)
   ```
   If you must keep the old form for a transition, pin `setuptools<77` in build-system.requires and add a TODO to migrate.
   ```

## Dead Ends

- **** — Temporarily hides the warning but breaks compatibility with other packages that require modern setuptools metadata. (70% fail)
- **** — Only mutes the warning; the deprecated table form will stop being parsed in a future release. (75% fail)
