fix(python-package): accept ZIP64 wheels on CPython 3.13.14 - #53
Merged
Merged
Conversation
zipfile._EndRecData reports the ZIP64 end record's offset for ZIP64 archives on CPython 3.13.14, where 3.13.5 reported the classic end record's offset. The probe used that offset for its physical-EOF and concatenation checks, so every valid ZIP64 wheel was rejected with "wheel physical EOF differs" on the pinned central Python image. The probe now derives the classic end record's offset from EOF and still verifies its signature there, so trailing bytes fail closed on both versions. Red: test_should_observe_bounded_forced_zip64_wheel fails on 3.13.14 before this change (1 failed, 22 passed) and passes after (23 passed), and still passes on 3.13.5. Adds a ZIP64 trailing-bytes rejection test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015oBArfm762nN1r4F4Fst5a
This was referenced Sep 25, 2026
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.
TL;DR
python-packagerejects every valid ZIP64 wheel on CPython 3.13.14, the Python that central CI pins. Its own gate is red there. This fixes the probe. The new hosted module gate (#run-module-gates, stacked on this PR) found it on its first run.Claim touched: "the release probe accepts exactly the wheels a real build produces and rejects anything with bytes outside the ZIP framing."
What broke
zipfile._EndRecDatachanged between CPython patch releases. For a ZIP64 archive it now reports the offset of the ZIP64 end record, not the classic end record:The probe used that offset for its physical-EOF and concatenation checks. On 3.13.14 it computed the wrong end of file and raised
wheel physical EOF differs.Fix
The classic end record always ends the file, so the probe now derives its offset from EOF (
size - 22 - comment_size) and still checks thePK\x05\x06signature there. Trailing bytes still fail closed on both versions. A new test covers a ZIP64 wheel with trailing bytes.Evidence
test_should_observe_bounded_forced_zip64_wheel, CPython 3.13.14, beforewheel physical EOF differs)poe gate(python-package), localgit merge-treevs #47, #48, #50, #51Merge order
Merge this before the stacked
ci/run-module-gatesPR. That PR runs every module gate on CPython 3.13.14 in hosted CI.🤖 Generated with Claude Code
https://claude.ai/code/session_015oBArfm762nN1r4F4Fst5a