#4221·mkdocs

Invalid metadata in published MkDocs 1.6.x wheels (License-Expression with Metadata-Version 2.3)

Author: ReneMuetterleinCreated Sep 29, 2026Updated Sep 29, 2026

The published MkDocs wheels for versions 1.6.0 and 1.6.1 fail validation with current Twine because they contain the License-Expression metadata field while declaring Core Metadata version 2.3.

License-Expression was introduced with Core Metadata 2.4.

Reproduction

Using Twine 7.0.0:

bash
python -m twine check mkdocs-1.6.1-py3-none-any.whl

results in:

InvalidDistribution: Invalid distribution metadata:
license-expression introduced in metadata version 2.4, not 2.3

The same issue occurs with:

mkdocs-1.6.0-py3-none-any.whl

Affected artifacts

MkDocs 1.6.1

File:   mkdocs-1.6.1-py3-none-any.whl
Size:   3864451 Bytes
SHA256: db91759624d1647f3f34aa0c3f327dd2601beae39a366d6e064c03468d35c20e

MkDocs 1.6.0

File:   mkdocs-1.6.0-py3-none-any.whl
Size:   3862264 Bytes
SHA256: 1eb5cb7676b7d89323e62b56235010216319217d4af5ddc543a91beb8d125ea7

Impact

The wheels can be installed normally, but current Twine validation rejects them. This becomes relevant when importing the official MkDocs artifacts into a private/internal PyPI registry where distributions are validated before being published. In our case we discovered this while validating upstream wheels before importing them into an air-gapped internal Python package registry.

Environment

Twine: 7.0.0

Validation command:

python -m twine check <wheel>

Would it be possible to correct the generated metadata in a future MkDocs 1.x release so that License-Expression is emitted together with the appropriate Core Metadata version?

Thank you!