Repository navigation
gh-162354: Expose zipfile.ZipFile options in zipapp - #162355
Open
Artoria2e5 wants to merge 1 commit into
Open
Artoria2e5 wants to merge 1 commit into
Artoria2e5 wants to merge 1 commit into
Conversation
create_archive() gains compression, compresslevel, allowZip64 and strict_timestamps, and the command line gains --compression and --level. --compress keeps working and still selects deflate. Unknown method names raise ZipAppError. Co-Authored-By: Skadi "Skadeep" Deepseek <noreply@deepseek.com>
Author
|
Apparantly I only had an uncommitted edit to Lib/zipapp.py, without anything else. Thanks AI I guess. Thing is easier than stimulants! |
Documentation build overview
|
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.
zipapponly lets you pick store or deflate through thecompressedflag.zipfile.ZipFilesupports more write options:compression,compresslevel,allowZip64andstrict_timestamps.This exposes all four on
create_archive(), and adds--compression METHODand-l/--level LEVELto the command line.-c/--compressstill works and still means deflate. Unknown method names raiseZipAppError.--compressstays a flag instead of taking an optional method, becausezipapp -c SOURCEhas to keep parsing.Tests cover method selection, compression level, unknown methods, a pre-1980 timestamp, and the CLI.
python -m test test_zipapppasses.AI assistance was used.