Skip to content

chore(ci): bump build-and-inspect-python-package v2 -> v3.0.1 - #19

Merged
jensens merged 1 commit into
mainfrom
chore/baipp-v3-metadata-25
Aug 24, 2026
Merged

chore(ci): bump build-and-inspect-python-package v2 -> v3.0.1#19
jensens merged 1 commit into
mainfrom
chore/baipp-v3-metadata-25

Conversation

@jensens

@jensens jensens commented Aug 24, 2026

Copy link
Copy Markdown
Member

Problem

The release workflow fails on main before uploading anything:

Checking dist/*.whl: ERROR InvalidDistribution: Invalid distribution metadata:
'2.5' is not a valid metadata version

Hatchling now emits Metadata-Version: 2.5, and the Twine bundled in
hynek/build-and-inspect-python-package@v2 does not know that version.

This is not the LICENSE commit

Worth stating explicitly, since the failure first showed up right after the
licensing PRs landed. It is unrelated — building the commit before the LICENSE
was added, with no LICENSE file in the tree at all, already produces:

Metadata-Version: 2.5
License-Expression: GPL-2.0-only

The trigger is the PEP 639 license = "<SPDX>" field plus a newer hatchling. The
LICENSE file only added a License-File: line. Every hatchling package in this
stack hits this on its next release build, which is why the same bump is going
out across all of them.

Fix

Bump to v3.0.1, whose release notes name exactly this: "Twine 7 that adds
support for packaging metadata 2.5 and PEP 794"
.

Pinned to the full version rather than @v3 on purpose — upstream stopped
force-tagging minor/micro releases in v3, so there is no moving @v3 tag.

Compatibility checked

Interface is identical between v2 and v3.0.1: same inputs, same artifact-name
output, and the artifact is still named Packages (echo "name=Packages${BAIPP_INPUTS_UPLOAD_NAME_SUFFIX}"
is byte-identical in both action.yml files), so the download-artifact steps
later in this workflow keep working unchanged.

🤖 Generated with Claude Code

The release build broke on main: hatchling now emits
`Metadata-Version: 2.5`, and the Twine bundled in the action's v2 rejects
it with

    InvalidDistribution: Invalid distribution metadata:
    '2.5' is not a valid metadata version

v3.0.0 ships Twine 7, which adds metadata 2.5 support (and PEP 794).

Not caused by the recently added LICENSE file: the commit before it,
without any LICENSE, already builds Metadata-Version 2.5. The trigger is
the PEP 639 `license = "<SPDX>"` field plus a newer hatchling, so every
hatchling package in this stack is affected on its next release.

Pinned to `@v3.0.1` rather than `@v3`: upstream deliberately stopped
force-tagging minor/micro releases in v3, so no moving `@v3` tag exists.

Interface is unchanged - same inputs, same `artifact-name` output, and the
uploaded artifact is still named `Packages`, so the download steps in this
workflow keep working.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jensens
jensens merged commit 8d56f17 into main Aug 24, 2026
14 checks passed
@jensens
jensens deleted the chore/baipp-v3-metadata-25 branch August 24, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant