Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.3k
gh-132983: Fix small issues with zstd support in zipfile#133723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
6 commits Select commitHold shift + click to select a range
114044f
zipfile: Add missing check for zstd compression when writing end record
pR0Ps321c098
zipfile: Add missing zstd compression documentation
pR0Ps4d59631
zipfile: Allow specifying a compresslevel for zstd compression
pR0Ps62186ff
Update Lib/zipfile/__init__.py
AA-Turner43b50d2
Wrap __all__ for PEP 8
pR0Pseac3402
Add zstd common compression levels and reference to docstring
pR0PsFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
zipfile: Add missing zstd compression documentation
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit321c0983a2e2e39948d5859fe321ac2be3854d04
There are no files selected for viewing
5 changes: 3 additions & 2 deletionsLib/zipfile/__init__.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -37,7 +37,7 @@ | ||
zstd = None | ||
__all__ = ["BadZipFile", "BadZipfile", "error", | ||
"ZIP_STORED", "ZIP_DEFLATED", "ZIP_BZIP2", "ZIP_LZMA", "ZIP_ZSTANDARD", | ||
pR0Ps marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
"is_zipfile", "ZipInfo", "ZipFile", "PyZipFile", "LargeZipFile", | ||
"Path"] | ||
@@ -1352,7 +1352,8 @@ class ZipFile: | ||
mode: The mode can be either read 'r', write 'w', exclusive create 'x', | ||
or append 'a'. | ||
compression: ZIP_STORED (no compression), ZIP_DEFLATED (requires zlib), | ||
ZIP_BZIP2 (requires bz2), ZIP_LZMA (requires lzma), or | ||
ZIP_ZSTANDARD (requires zstd). | ||
AA-Turner marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
allowZip64: if True ZipFile will create files with ZIP64 extensions when | ||
needed, otherwise it will raise an exception when this would | ||
be necessary. | ||
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.