From c72e4e6dccce99bcdcb45959767436d7e5cfda8c Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Fri, 22 Nov 2013 22:39:36 +1000 Subject: Issue #19619: Blacklist non-text codecs in method API str.encode, bytes.decode and bytearray.decode now use an internal API to throw LookupError for known non-text encodings, rather than attempting the encoding or decoding operation and then throwing a TypeError for an unexpected output type. The latter mechanism remains in place for third party non-text encodings. --- Lib/encodings/base64_codec.py | 1 + 1 file changed, 1 insertion(+) (limited to 'Lib/encodings/base64_codec.py') diff --git a/Lib/encodings/base64_codec.py b/Lib/encodings/base64_codec.py index 321a961782..881d1ba0be 100644 --- a/Lib/encodings/base64_codec.py +++ b/Lib/encodings/base64_codec.py @@ -52,4 +52,5 @@ def getregentry(): incrementaldecoder=IncrementalDecoder, streamwriter=StreamWriter, streamreader=StreamReader, + _is_text_encoding=False, ) -- cgit v1.2.1