Skip to content

release: strip the wheel Name before comparing it, so a CRLF METADATA from Windows passes - #91

Merged
tae898 merged 2 commits into
mainfrom
fix-release-guard-crlf
Oct 26, 2026
Merged

tae898 merged 2 commits into
mainfrom
fix-release-guard-crlf

Conversation

@tae898

@tae898 tae898 commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

The 26.11.1.dev0 pre-release failed for both packages and nothing reached PyPI. Root cause for both: the METADATA of a wheel built on Windows has CRLF line endings (all 114 lines of arcadedb-26.11.1.dev0-py3-none-win_amd64.whl, 0 in the other three), so the Name value read by the release guards ended in a carriage return and no longer equalled the distribution name.

Native run 40248994598, job "Publish to PyPI", step "Refuse unless every wheel is the distribution arcadedb": arcadedb-26.11.1.dev0-py3-none-win_amd64.whl: file name says arcadedb, METADATA says arcadedb. The two strings differed by the invisible \r.

JVM run 40248994579, job "Verify wheels" (Publish was skipped): the wheels disagree on distribution name and import package: [('arcadedb-jvm', ('arcadedb',)), ('arcadedb-jvm\r', ('arcadedb',))]. The wheel count (16), platform counts, versions and sizes (62 to 67 MB) all passed before that line; the wheel size was not the cause for this tag.

The fix strips the Name value and the PEP 503 normaliser strips too, in the three places that read it (the native publish guard, the JVM wheel check and the JVM publish guard). A name that differs in anything else is still a hard refusal, and the refusal message now shows both names with repr so an invisible difference is visible next time. packaging.metadata.parse_email reads the CRLF METADATA of that wheel cleanly (name arcadedb), so the file itself is valid for PyPI and needs no rebuild change.

tests/test_release_name_guards.py takes the guard code out of the two workflow files and runs it on small synthetic wheels: LF, CRLF, trailing blanks and spelling variants pass; another distribution in the file name or in the METADATA, one wrong wheel among right ones, and a native wheel in the JVM workflow (and the reverse) are refused; the JVM wheel check passes 16 wheels whose Windows METADATA is CRLF and refuses a set with two distributions. On the old workflows 9 of its 21 tests fail with the production error; with the fix all 21 pass.

After the merge the 26.11.1.dev0 tag moves to the new main commit (it uploaded nothing, so the version is still free on PyPI) and both release workflows run again.

🤖 Generated with Claude Code

tae898 and others added 2 commits October 26, 2026 12:04
… from Windows passes

The METADATA of a wheel built on Windows has CRLF line endings, so the Name value read by the release guards ended in a carriage
return. In 26.11.1.dev0 the native publish guard stopped on "arcadedb-26.11.1.dev0-py3-none-win_amd64.whl: file name says arcadedb,
METADATA says arcadedb", and the JVM wheel check stopped on "the wheels disagree on distribution name and import package:
[('arcadedb-jvm', ...), ('arcadedb-jvm\r', ...)]". Nothing reached PyPI.

The three places that read the Name (release-native.yml publish guard, release-jvm.yml wheel check and publish guard) now strip
the value and the PEP 503 normaliser strips too. A name that differs in anything else is still a hard refusal, and the refusal
message shows both names with repr so an invisible difference is visible next time.

tests/test_release_name_guards.py runs the guard code taken from the workflow files on synthetic wheels: LF, CRLF, trailing blanks and
spelling variants pass; another distribution in the file name or the METADATA, one wrong wheel among right ones and a native wheel in
the JVM workflow (and the reverse) are refused; the JVM wheel check passes 16 wheels whose Windows METADATA is CRLF. On the old
workflows 9 of its 21 tests fail with the production error.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…est's data names

The old-name check failed on main since #84 (the three steps of "Migrate from the old names" in which-package.adoc must name the
old packages; docs-only changes skip the test run that would have shown it) and on the new tests/test_release_name_guards.py (a guard
test needs another distribution name as data).

The migration steps are allowed by one phrase each (pip uninstall, "if you used", "both become"), not by the whole page. The test
names the other distribution in two constants that carry the allow-old-name marker. The check itself is not weakened: any other line
that names the old package still fails.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@tae898
tae898 merged commit 00f29ff into main Oct 26, 2026
20 checks passed
@tae898
tae898 deleted the fix-release-guard-crlf branch October 26, 2026 04:16
@tae898 tae898 mentioned this pull request Oct 26, 2026
4 of 7 tasks
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