-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-132983: Clean-ups for _zstd
#133670
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
gh-132983: Clean-ups for _zstd
#133670
Conversation
I read through your commits and have no objections, but I don't feel confident enough to review this on my own. Did you decide to leave functions of |
Good question -- this PR was getting too big, so I just submitted the changes to the module-level constants. I intend to go through the functions in a follow-up. A |
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.
I have one request but otherwise I think these changes look like great clean ups. Thanks!
This reverts commit e02f66c.
Thanks @AA-Turner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
(cherry picked from commit c2a5d4b) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
GH-133756 is a backport of this pull request to the 3.14 branch. |
cc @Rogdham (can't request review).
Best reviewed commit-by-commit.
This contains several clean-ups for the
_zstd
module._compressionLevel_values
is replaced with a single int constant, the default compression levelzstd_version_info
is initialised from the macros, removing version decomposition arithmetic_ZSTD_CStreamSizes
_ZSTD_DStreamSizes
withZSTD_DStreamOutSize
_ZSTD_Config
set_zstd_error()
add_parameters
function and use the existingPyModule_AddIntMacro
rather than defining a local equivalentcompression.zstd
A