GeezerVison is showing github.com — GH-132983: Remove subclassing support from zstd types by AA-Turner · Pull Request #133694 · python/cpython
Conversation
AA-Turner
commented
May 8, 2025
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
cc @Rogdham
For what it's worth, bz2 and lzma's decompressor subclassing fail on creation:
>>> import bz2
>>> class D(bz2.BZ2Decompressor): pass
...
Traceback (most recent call last):
File "<python-input-18>", line 1, in <module>
class D(bz2.BZ2Decompressor): pass
TypeError: type '_bz2.BZ2Decompressor' is not an acceptable base type
>>> import lzma
>>> class D(lzma.LZMADecompressor): pass
...
Traceback (most recent call last):
File "<python-input-19>", line 1, in <module>
class D(lzma.LZMADecompressor): pass
TypeError: type '_lzma.LZMADecompressor' is not an acceptable base type
Sorry, something went wrong.
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.
LGTM, I also confirmed it works as intended.
I just noticed the case difference between zstdcompressor_type_spec and ZstdDecompressor_type_spec (and same for …_slots), but maybe it's for an other PR?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
See #133674, which does the rename.
|
Rogdham reacted with thumbs up emoji
Sorry, something went wrong.
Uh 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.
🐍🍒⛏🤖
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Pranjal095
pushed a commit
to Pranjal095/cpython
that referenced
this pull request
Jul 12, 2025
…33694)
For consistency with ``bz2``, ``lzma``, and ``zlib``.
taegyunkim
pushed a commit
to taegyunkim/cpython
that referenced
this pull request
Aug 4, 2025
…33694)
For consistency with ``bz2``, ``lzma``, and ``zlib``.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
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.
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.
|