Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-132983: Simplify_zstd_exec()
#133775
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
Overall, I think it's a nice improvement but usually, C classes are read-only (e.g.,_sha2.SHA2Type
does not allow setting class variables afterwards; the same holds forlzma.LZMACompressor
so it would be better to do the same for the Zstd* types)
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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.
It would be better to make classes implemented in C immutable.
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 are great refactors.
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.
You can addPy_TPFLAGS_IMMUTABLETYPE
in this PR or in another.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
bbe9c31
intopython:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@AA-Turner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
(cherry picked from commitbbe9c31)Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
GH-133786 is a backport of this pull request to the3.14 branch. |
Uh oh!
There was an error while loading.Please reload this page.
cc@Rogdham (can't request review).
Follows on from#133670. Again best reviewed commit-by-commit. We remove around 100 lines of C code overall.
The last commit (
6a3a135
(#133775)) only serves to merge two functions and contains no behaviour change, but does increase the diff size.add_type_to_module()
function with anADD_TYPE
macro, usingPyModule_AddType
instead ofPyModule_AddObjectRef
._zstd
module.