8000 gh-132983: Fix small issues with zstd support in zipfile by pR0Ps · Pull Request #133723 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
zipfile: Add missing check for zstd compression when writing end record
  • Loading branch information
pR0Ps committed May 9, 2025
commit 114044fe91df7c75c3939821e57a3ec006fb14bc
2 changes: 2 additions & 0 deletions Lib/zipfile/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2093,6 +2093,8 @@ def _write_end_record(self):
min_version = max(BZIP2_VERSION, min_version)
elif zinfo.compress_type == ZIP_LZMA:
min_version = max(LZMA_VERSION, min_version)
elif zinfo.compress_type == ZIP_ZSTANDARD:
min_version = max(ZSTANDARD_VERSION, min_version)

extract_version = max(min_version, zinfo.extract_version)
create_version = max(min_version, zinfo.create_version)
Expand Down
0