GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-132983: Fix small issues with zstd support in zipfile by pR0Ps · Pull Request #133723 · python/cpython

Conversation

@pR0Ps

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

Uh oh!

There was an error while loading. Please reload this page.

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

  • Issue: Implement PEP 784 - Adding Zstandard to the Python standard library #132983

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
pR0Ps added 3 commits May 8, 2025 21:39
@pR0Ps
zipfile: Add missing check for zstd compression when writing end record
114044f
@pR0Ps
zipfile: Add missing zstd compression documentation
321c098
@pR0Ps
zipfile: Allow specifying a compresslevel for zstd compression
4d59631
@bedevere-app bedevere-app Bot added the awaiting review label May 9, 2025
@pR0Ps pR0Ps mentioned this pull request May 9, 2025
Add support for zstd compression where provided by stdlib pR0Ps/zipstream-ng#26
Merged
emmatyping
emmatyping reviewed May 9, 2025
View reviewed changes

@emmatyping emmatyping left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/zipfile/__init__.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/zipfile/__init__.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@emmatyping emmatyping added the skip news label May 9, 2025
@emmatyping 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
@bedevere-app bedevere-app Bot mentioned this pull request May 9, 2025
Implement PEP 784 - Adding Zstandard to the Python standard library #132983
Closed
13 tasks done
@AA-Turner AA-Turner added the needs backport to 3.14 bugs and security fixes label May 9, 2025
@AA-Turner @emmatyping
Update Lib/zipfile/__init__.py
62186ff
Co-authored-by: Emma Smith <[email protected]>
AA-Turner
AA-Turner reviewed May 9, 2025
View reviewed changes
Comment thread Lib/zipfile/__init__.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

pR0Ps added 2 commits May 9, 2025 20:23
@pR0Ps
Wrap __all__ for PEP 8
43b50d2
@pR0Ps
Add zstd common compression levels and reference to docstring
eac3402
@pR0Ps

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

AA-Turner
AA-Turner approved these changes May 10, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels May 10, 2025
emmatyping
emmatyping approved these changes May 10, 2025
View reviewed changes
@hugovk 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
AA-Turner merged commit 35f47d0 into python:main May 13, 2025
@miss-islington-app

miss-islington-app Bot commented 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.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label May 13, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 13, 2025
@pR0Ps @AA-Turner
@emmatyping @miss-islington
pythongh-132983: Fix small issues with zstd support in zipfile (pytho…
76b48d6
…nGH-133723)

(cherry picked from commit 35f47d0)

Co-authored-by: Carey Metcalfe <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Emma Smith <[email protected]>
@bedevere-app

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app 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
@miss-islington @pR0Ps
@AA-Turner @emmatyping
[3.14] gh-132983: Fix small issues with zstd support in zipfile (GH-1…
b94a63c
…33723) (#133974)

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

Co-authored-by: Carey Metcalfe <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Emma Smith <[email protected]>
@pR0Ps
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
@pR0Ps @AA-Turner
@emmatyping @Pranjal095
pythongh-132983: Fix small issues with zstd support in zipfile (pytho…
da2912a
…n#133723)

Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Emma Smith <[email protected]>
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
@pR0Ps @AA-Turner
@emmatyping @taegyunkim
pythongh-132983: Fix small issues with zstd support in zipfile (pytho…
9b41432
…n#133723)

Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Emma Smith <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@AA-Turner AA-Turner AA-Turner approved these changes
@emmatyping emmatyping emmatyping approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@pR0Ps @AA-Turner @emmatyping
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.