Author ncoghlan
Recipients Oren Milman, ncoghlan, serhiy.storchaka, veky
Date 2017-08-25.13:36:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1503668214.82.0.0178289426871.issue31271@psf.upfronthosting.co.za>
In-reply-to
Content
The proposed fix looks good to me, but it did make me wonder if we might have a missing check in the other direction as well. However, it looks like that case is already fine:


```
>>> hex_codec = codecs.lookup("hex")
>>> hex_codec._is_text_encoding = True
>>> t = io.TextIOWrapper(io.BytesIO(b'foo'), encoding="hex")
>>> t.buffer.write(b'abcd')
4
>>> t.read()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: decoder should return a string result, not 'bytes'
```
History
Date User Action Args
2017-08-25 13:36:54ncoghlansetrecipients: + ncoghlan, serhiy.storchaka, veky, Oren Milman
2017-08-25 13:36:54ncoghlansetmessageid: <1503668214.82.0.0178289426871.issue31271@psf.upfronthosting.co.za>
2017-08-25 13:36:54ncoghlanlinkissue31271 messages
2017-08-25 13:36:54ncoghlancreate