summaryrefslogtreecommitdiffstats
path: root/Lib/encodings/rot_13.py
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2013-11-22 12:39:36 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2013-11-22 12:39:36 (GMT)
commitc72e4e6dccce99bcdcb45959767436d7e5cfda8c (patch)
tree029832d80cc82a039dc1014302c9eb9dd2214543 /Lib/encodings/rot_13.py
parent322f5ba0d8d5e8a9cd2a134fa215884b4cbc373d (diff)
downloadcpython-c72e4e6dccce99bcdcb45959767436d7e5cfda8c.zip
cpython-c72e4e6dccce99bcdcb45959767436d7e5cfda8c.tar.gz
cpython-c72e4e6dccce99bcdcb45959767436d7e5cfda8c.tar.bz2
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.
Diffstat (limited to 'Lib/encodings/rot_13.py')
-rwxr-xr-xLib/encodings/rot_13.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/encodings/rot_13.py b/Lib/encodings/rot_13.py
index 3140c14..fff9153 100755
--- a/Lib/encodings/rot_13.py
+++ b/Lib/encodings/rot_13.py
@@ -43,6 +43,7 @@ def getregentry():
incrementaldecoder=IncrementalDecoder,
streamwriter=StreamWriter,
streamreader=StreamReader,
+ _is_text_encoding=False,
)
### Map