FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-113924: Allow pre-compressed data to be written into a zip via `zipfile`. by gpshead · Pull Request #113925 · python/cpython · GitHub

Repository navigation

gh-113924: Allow pre-compressed data to be written into a zip via zipfile. - #113925

Closed
gpshead wants to merge 3 commits into
python:mainfrom
gpshead:zipfile/write/pre-compressed
Closed

gpshead wants to merge 3 commits into
python:mainfrom
gpshead:zipfile/write/pre-compressed

Conversation

gpshead commented Jan 10, 2024 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Intended to be used when constructing zip files via a system that can parallelize and cache all actions including compressing individual input file contents so that you can distribute actions & avoid recomputation.

This also adds the missing ability to pass in pre-constructed ZipInfo to the write method as pre-compressed data needs its original file_size and uncompressed data CRC to also have been pre-computed.

Intended to be used when constructing zip files via a system that can
parallelize and cache all actions including compressing individual input
file contents so that you can distribute actions & avoid recomputation.
Comment thread Lib/zipfile/__init__.py
Comment on lines +1016 to +1017
f"Bad CRC-32 for file {self.name!r} expected "
f"{hex(self._expected_crc)} != {hex(self._running_crc)}")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Did you keep the beginning of the error message identical to keep compatibility?
If not, then it could be easier to read if it was like bad crc32 {got value} for file {name}, expected {expected value}. For now it’s slightly unpleasant to read about bad value, expected, expected, bad.

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 15, 2026

ambv commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

This PR is superseded by #125718, a newer open pull request for the same issue (gh-113924), and it no longer merges cleanly. Closing to cull the number of open pull requests. Do not reopen this pull request without getting a go-ahead from a triager or core developer.

ambv closed this Oct 20, 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

Labels

stale Stale PR or inactive for long period of time. type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL