-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
_io.IncrementalNewlineDecoder doesn't inherit codecs.IncrementalDecoder #75903
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
Comments
It is documented that io.IncrementalNewlineDecoder inherits codecs.IncrementalDecoder. And the Python implementation does. But the C implementation doesn't. >>> issubclass(_pyio.IncrementalNewlineDecoder, codecs.IncrementalDecoder)
True
>>> issubclass(_io.IncrementalNewlineDecoder, codecs.IncrementalDecoder)
False
>>> issubclass(io.IncrementalNewlineDecoder, codecs.IncrementalDecoder)
False |
As a consequence, _io.IncrementalNewlineDecoder doesn't have the error attribute. |
Just find the same problem while investigating io. |
tungol
added a commit
to tungol/typeshed
that referenced
this issue
Dec 10, 2023
…ecoder The documentation says that this cass "inherits codecs.IncrementalDecoder", but it's not true for the C implementation. The python implementation, _pyio.io.IncrementalNewlineDecoder, *does* inherit from codecs.IncrementalDecoder, but that's not the implementation that you get with `from io import IncrementalNewlineDecoder`. cpython has a ticket for this issue here: python/cpython#75903 In the meantime, I think this is more correct. Related to python#3968
tungol
added a commit
to tungol/typeshed
that referenced
this issue
Dec 10, 2023
…ecoder The documentation says that this cass "inherits codecs.IncrementalDecoder", but it's not true for the C implementation. The python implementation, _pyio.IncrementalNewlineDecoder, *does* inherit from codecs.IncrementalDecoder, but that's not the implementation that you get with `from io import IncrementalNewlineDecoder`. cpython has a ticket for this issue here: python/cpython#75903 In the meantime, I think this is more correct. Related to python#3968
tungol
added a commit
to tungol/typeshed
that referenced
this issue
Dec 10, 2023
…ecoder The documentation says that this class "inherits codecs.IncrementalDecoder", but it's not true for the C implementation. The python implementation, _pyio.IncrementalNewlineDecoder, *does* inherit from codecs.IncrementalDecoder, but that's not the implementation that you get with `from io import IncrementalNewlineDecoder`. cpython has a ticket for this issue here: python/cpython#75903 In the meantime, I think this is more correct. Related to python#3968
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: