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

gh-132983: Fix small issues with zstd support in zipfile by pR0Ps · Pull Request #133723 · python/cpython · GitHub

/ cpython Public

gh-132983: Fix small issues with zstd support in zipfile - #133723

Merged
AA-Turner merged 6 commits into
python:mainfrom
pR0Ps:feature/zipfile-zstd-compresslevel
May 13, 2025
Merged

gh-132983: Fix small issues with zstd support in zipfile#133723
AA-Turner merged 6 commits into
python:mainfrom
pR0Ps:feature/zipfile-zstd-compresslevel

Conversation

pR0Ps commented May 9, 2025
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Some small tweaks to the zipfile zstd support added in #133365

  • Add ZIP_ZSTANDARD constant to the module's __all__
  • Add zstd notes to the ZipFile's docstring.
  • Add a missing check for min_level in _write_end_record
  • Pass through the specified compresslevel into the ZstdCompressor and document it.

Note: I didn't create an issue because this all seems fairly trivial, but I can if needed.

CC: @emmatyping @gpshead

emmatyping left a comment

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

Thanks, these changes look good! I had a few minor suggestions. I think we should be careful how we document the accepted values for zstd's compression level. I don't think we can or should hardcode the values, but I also think giving a pointer to where the current values can be found would be useful.

Comment thread Lib/zipfile/__init__.py Outdated
Comment thread Lib/zipfile/__init__.py Outdated
emmatyping changed the title Fix small issues with zstd support in zipfile GH-132983: Fix small issues with zstd support in zipfile May 9, 2025
AA-Turner added the needs backport to 3.14 bugs and security fixes label May 9, 2025
Co-authored-by: Emma Smith <emma@emmatyping.dev>
Comment thread Lib/zipfile/__init__.py Outdated

pR0Ps commented May 10, 2025

Copy link
Copy Markdown
Contributor Author

All requested changes applied. I see a test failed, but as far as I can tell it's not related to the changes in this PR.

hugovk changed the title GH-132983: Fix small issues with zstd support in zipfile gh-132983: Fix small issues with zstd support in zipfile May 10, 2025
AA-Turner merged commit 35f47d0 into python:main May 13, 2025

Copy link
Copy Markdown

Thanks @pR0Ps for the PR, and @AA-Turner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 13, 2025
…nGH-133723)

(cherry picked from commit 35f47d0)

Co-authored-by: Carey Metcalfe <carey@cmetcalfe.ca>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>

bedevere-app Bot commented May 13, 2025

Copy link
Copy Markdown

GH-133974 is a backport of this pull request to the 3.14 branch.

bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label May 13, 2025
AA-Turner added a commit that referenced this pull request May 13, 2025
…33723) (#133974)

gh-132983: Fix small issues with zstd support in zipfile (GH-133723)
(cherry picked from commit 35f47d0)

Co-authored-by: Carey Metcalfe <carey@cmetcalfe.ca>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
pR0Ps deleted the feature/zipfile-zstd-compresslevel branch May 13, 2025 22:13
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
…n#133723)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
…n#133723)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL