Author ncoghlan
Recipients benjamin.peterson, brett.cannon, djmitche, lemburg, martin.panter, ncoghlan, serhiy.storchaka
Date 2015-05-30.13:59:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1432994353.24.0.920800943297.issue19543@psf.upfronthosting.co.za>
In-reply-to
Content
Serhiy's patch looks to me like it would pragmatically cover all the cases most likely to affect porting efforts: using the standard library bytes<->bytes codecs through the convenience methods.

For a Python 2 backport, I'm slightly more concerned with exposing the argument in the constructor signature, but see value in being consistent with Python 3 if anyone decides to use this to check a custom codec.

The main advantage this approach has over the typecheck based approach is that it can correctly warn about "data".encode("hex"), while a typecheck based approach can't distinguish that from "text".encode("ascii")
History
Date User Action Args
2015-05-30 13:59:13ncoghlansetrecipients: + ncoghlan, lemburg, brett.cannon, djmitche, benjamin.peterson, martin.panter, serhiy.storchaka
2015-05-30 13:59:13ncoghlansetmessageid: <1432994353.24.0.920800943297.issue19543@psf.upfronthosting.co.za>
2015-05-30 13:59:13ncoghlanlinkissue19543 messages
2015-05-30 13:59:12ncoghlancreate