Author xiang.zhang
Recipients xiang.zhang
Date 2018-10-25.04:03:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1540440221.28.0.788709270274.issue35062@psf.upfronthosting.co.za>
In-reply-to
Content
io.IncrementalNewlineDecoder gets a *translate* bitwise struct field, but it could be assigned arbitrary int value. This leads to inconsistent behaviour, evens are evaluated to False and odds to True.

>>> io.IncrementalNewlineDecoder(encodings.utf_8.IncrementalDecoder(), 4).decode(b"abcd\r\n")
u'abcd\r\n'
>>> io.IncrementalNewlineDecoder(encodings.utf_8.IncrementalDecoder(), 5).decode(b"abcd\r\n")
u'abcd\n'
History
Date User Action Args
2018-10-25 04:03:41xiang.zhangsetrecipients: + xiang.zhang
2018-10-25 04:03:41xiang.zhangsetmessageid: <1540440221.28.0.788709270274.issue35062@psf.upfronthosting.co.za>
2018-10-25 04:03:40xiang.zhanglinkissue35062 messages
2018-10-25 04:03:40xiang.zhangcreate