From a4b3e8c2cec14c51d96d34226639ceb7dfed4ceb Mon Sep 17 00:00:00 2001 From: igor-ctrl Date: Tue, 11 Aug 2026 16:35:35 -0500 Subject: [PATCH] fix(build): pin hatchling below 1.32 so the wheel stays publishable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The v0.8.1 upload failed with: InvalidDistribution: Invalid distribution metadata: '2.5' is not a valid metadata version hatchling 1.32.0 started emitting Metadata-Version 2.5; the twine inside our pinned gh-action-pypi-publish (v1.14.0) only accepts up to 2.4, so it rejected the wheel before it ever reached the approval gate. Nothing in this repo changed to cause it — `requires = ["hatchling"]` was unpinned, so CI silently picked up a new backend. v0.8.0 published fine yesterday for that reason alone. Verified locally by building against each version: 1.30.1 -> 2.4, 1.31.0 -> 2.4, 1.32.0 -> 2.5. With the pin the wheel builds as 2.4 again. Pinning also restores build reproducibility, which an unpinned build backend cost us regardless of this failure. The forward-looking fix is to bump the publish action to a release whose twine accepts 2.5 (v1.14.2 is the candidate) and then widen this pin — that needs verifying against the real action, so it is deliberately not bundled here. --- pyproject.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b60a129..0601bc8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,10 @@ [build-system] -requires = ["hatchling"] +# Pinned: hatchling 1.32 emits Metadata-Version 2.5, which the twine inside +# our pinned gh-action-pypi-publish rejects ("not a valid metadata version"), +# failing the 0.8.1 upload. An unpinned build backend also makes builds +# non-reproducible. Un-pin once the publish action ships a twine that +# accepts 2.5 (v1.14.2+ is the candidate; verify before widening). +requires = ["hatchling<1.32"] build-backend = "hatchling.build" [project]