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 <>
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')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: decoder should return a string result, not 'bytes'
Date User Action Args
2017-08-25 13:36:54ncoghlansetrecipients: + ncoghlan, serhiy.storchaka, veky, Oren Milman
2017-08-25 13:36:54ncoghlansetmessageid: <>
2017-08-25 13:36:54ncoghlanlinkissue31271 messages
2017-08-25 13:36:54ncoghlancreate