{{ message }}
gh-132983: Split _zstd_set_c_parameters - #133921
Merged
Merged
Conversation
13 tasks
AA-Turner
force-pushed
the
zstd-set-params
branch
from
May 12, 2025 12:31
3271d2c to
d44dd9b
Compare
Member
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
# Conflicts: # Modules/_zstd/compressor.c
serhiy-storchaka
previously requested changes
May 24, 2025
|
When you're done making the requested changes, leave the comment: |
emmatyping
approved these changes
May 26, 2025
emmatyping
left a comment
Member
There was a problem hiding this comment.
A few suggestions for wording of error messages, but I think otherwise this looks great. Thank you for refactoring this!
emmatyping
approved these changes
May 27, 2025
emmatyping
left a comment
Member
There was a problem hiding this comment.
Thanks, this is a great refactor!
AA-Turner
enabled auto-merge (squash)
May 28, 2025 12:43
serhiy-storchaka
approved these changes
May 28, 2025
serhiy-storchaka
left a comment
Member
There was a problem hiding this comment.
I am not sure about term "illegal", this is a question to native speakers, but the rest LGTM. Thank you.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Member
It's not wrong, but perhaps invalid is better? |
|
Thanks @AA-Turner for the PR 🌮🎉.. 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 28, 2025
(cherry picked from commit 11f7a93) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
AA-Turner
added a commit
that referenced
this pull request
May 28, 2025
Pranjal095
pushed a commit
to Pranjal095/cpython
that referenced
this pull request
Jul 12, 2025
taegyunkim
pushed a commit
to taegyunkim/cpython
that referenced
this pull request
Aug 4, 2025
gostak-dd
pushed a commit
to gostak-dd/cpython
that referenced
this pull request
Jun 2, 2026
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.

The current
_zstd_set_c_parametersshares little between the two possible (int or dict) paths. By splitting the function, we can now use thePy_ssize_tAC converter.One slight change worth noting is that the constructor won't raise an error when level is$-2^{63}$ but will just silently use the default. cc @erlend-aasland if there's a better method/sentinel we can use in the clinic to detect if the value has been set or not.
I also think it might be worth considering removing the level XOR options check, as we could adopt the rule that a compression level set in an options dict overrides the level parameter. I can see reasonable arguments to keep the status quo, however, so I've not done this yet.
A
cc @Rogdham