classification
Title: _io.IncrementalNewlineDecoder doesn't inherit codecs.IncrementalDecoder
Type: behavior Stage: patch review
Components: IO, Library (Lib) Versions: Python 3.7, Python 3.6, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, serhiy.storchaka, stutzbach
Priority: normal Keywords: patch

Created on 2017-10-07 14:26 by serhiy.storchaka, last changed 2017-10-10 19:05 by serhiy.storchaka.

Messages (2)
msg303879 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-10-07 14:26
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
msg303880 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-10-07 14:43
As a consequence, _io.IncrementalNewlineDecoder doesn't have the error attribute.
History
Date User Action Args
2017-10-10 19:05:39serhiy.storchakasetpull_requests: - pull_request3918
2017-10-10 19:03:58Oren Milmansetkeywords: + patch
stage: patch review
pull_requests: + pull_request3918
2017-10-07 14:43:08serhiy.storchakasetmessages: + msg303880
2017-10-07 14:26:41serhiy.storchakacreate