From d4c30f2e66cc22a0f6532bcd3e33069f91177b96 Mon Sep 17 00:00:00 2001 From: Roy Moore Date: Sat, 15 Aug 2026 16:41:54 +0300 Subject: [PATCH] fix(build): pin hatchling <1.32 to fix twine check CI failure hatchling>=1.32 emits Metadata-Version 2.5 in wheel/sdist metadata, which twine 6.2.0 (via packaging) does not yet recognize as valid, causing the 'Run twine check' CI step to fail with: InvalidDistribution: Invalid distribution metadata: '2.5' is not a valid metadata version. Pin hatchling to <1.32 so it keeps emitting Metadata-Version 2.4, which is compatible with the current twine/packaging toolchain. See https://github.com/pypa/twine/issues/1327 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6536a34d-6afa-4f02-81ed-89dc72586d04 --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 06b845fb..a06d5011 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -166,7 +166,9 @@ dev = [ # ---------- Hatchling build configuration ---------- [build-system] -requires = ["hatchling"] +# hatchling>=1.32 emits Metadata-Version 2.5, which the pinned twine version +# does not yet recognize as valid (https://github.com/pypa/twine/issues/1327). +requires = ["hatchling>=1.26,<1.32"] build-backend = "hatchling.build" [tool.hatch.build]