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

Created on 2017-10-07 14:26 by serhiy.storchaka, last changed 2019-10-08 18:46 by corona10.

Pull Requests
URL Status Linked Edit
PR 16664 open corona10, 2019-10-08 18:13
Messages (3)
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.
msg328293 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2018-10-23 09:06
Just find the same problem while investigating io.
History
Date User Action Args
2019-10-08 18:46:56corona10setnosy: + corona10
2019-10-08 18:13:05corona10setstage: needs patch -> patch review
pull_requests: + pull_request16247
2018-10-23 09:06:11xiang.zhangsetversions: + Python 3.8
nosy: + xiang.zhang

messages: + msg328293

stage: patch review -> needs patch
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