Author ncoghlan
Recipients brett.cannon, djmitche, lemburg, martin.panter, ncoghlan
Date 2015-04-25.06:48:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429944499.86.0.665825016016.issue19543@psf.upfronthosting.co.za>
In-reply-to
Content
For the warnings, it's actually bytes.decode() (et al) that are expected to return str, and str.encode() that's expected to return bytes. The codecs themselves remain free to do what they want (hence the recommendation to use codecs.encode() and codecs.decode() to invoke arbitrary codecs without the type constraints of the builtins). Aside from that, those 2 warnings and the unicode.decode() one look good.

However, the "bytes.encode()" warning is the one we determined couldn't be treated as a warning as "text".encode("ascii") is valid in both Python 2 & 3, it just does a str->str conversion in 2.x, and a str -> bytes conversion in 3.x.
History
Date User Action Args
2015-04-25 06:48:19ncoghlansetrecipients: + ncoghlan, lemburg, brett.cannon, djmitche, martin.panter
2015-04-25 06:48:19ncoghlansetmessageid: <1429944499.86.0.665825016016.issue19543@psf.upfronthosting.co.za>
2015-04-25 06:48:19ncoghlanlinkissue19543 messages
2015-04-25 06:48:19ncoghlancreate