Repository navigation
release: strip the wheel Name before comparing it, so a CRLF METADATA from Windows passes - #91
Merged
Merged
Conversation
… 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]>
4 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_emailreads the CRLF METADATA of that wheel cleanly (namearcadedb), so the file itself is valid for PyPI and needs no rebuild change.tests/test_release_name_guards.pytakes 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