cpython/Lib/encodings
Serhiy Storchaka 94ee389308 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.

Backported changeset d68df99d7a57.
2014-02-24 14:43:03 +02:00
..
__init__.py Closes #13258: Use callable() built-in in the standard library. 2011-10-28 14:45:05 +02:00
aliases.py Issue #10807: Remove base64, bz2, hex, quopri, rot13, uu and zlib codecs from 2011-01-02 19:50:36 +00:00
ascii.py Merge part of the trunk changes into the p3yk branch. This merges from 43030 2006-04-21 09:43:23 +00:00
base64_codec.py Issue #19619: Blacklist non-text codecs in method API 2014-02-24 14:43:03 +02:00
big5.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
big5hkscs.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
bz2_codec.py Issue #19619: Blacklist non-text codecs in method API 2014-02-24 14:43:03 +02:00
charmap.py Merge part of the trunk changes into the p3yk branch. This merges from 43030 2006-04-21 09:43:23 +00:00
cp037.py Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels. 2012-06-16 22:48:21 +02:00
cp424.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp437.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp500.py Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels. 2012-06-16 22:48:21 +02:00
cp720.py Merged revisions 78806 via svnmerge from 2010-03-08 22:17:58 +00:00
cp737.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp775.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp850.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp852.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp855.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp856.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp857.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp858.py Merged revisions 81499,81506 via svnmerge from 2010-06-27 22:41:29 +00:00
cp860.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp861.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp862.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp863.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp864.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp865.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp866.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp869.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp874.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp875.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp932.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
cp949.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
cp950.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
cp1006.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1026.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1140.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1250.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1251.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1252.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1253.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1254.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1255.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1256.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1257.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp1258.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
cp65001.py Close #13247: Add cp65001 codec, the Windows UTF-8 (CP_UTF8) 2011-10-27 01:38:56 +02:00
euc_jis_2004.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
euc_jisx0213.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
euc_jp.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
euc_kr.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
gb2312.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
gb18030.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
gbk.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
hex_codec.py Issue #19619: Blacklist non-text codecs in method API 2014-02-24 14:43:03 +02:00
hp_roman8.py Normalize whitespace 2012-06-16 22:50:54 +02:00
hz.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
idna.py Speed up IDNA for the common case 2011-11-10 22:49:20 +01:00
iso2022_jp.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
iso2022_jp_1.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
iso2022_jp_2.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
iso2022_jp_3.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
iso2022_jp_2004.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
iso2022_jp_ext.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
iso2022_kr.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
iso8859_1.py Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels. 2012-06-16 22:48:21 +02:00
iso8859_2.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_3.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_4.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_5.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_6.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_7.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_8.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_9.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_10.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_11.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_13.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_14.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_15.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
iso8859_16.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
johab.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
koi8_r.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
koi8_u.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
latin_1.py Merge part of the trunk changes into the p3yk branch. This merges from 43030 2006-04-21 09:43:23 +00:00
mac_arabic.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_centeuro.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_croatian.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_cyrillic.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_farsi.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_greek.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_iceland.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_latin2.py Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels. 2012-06-16 22:48:21 +02:00
mac_roman.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_romanian.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mac_turkish.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
mbcs.py Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
palmos.py Normalize whitespace 2012-06-16 22:50:54 +02:00
ptcp154.py Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels. 2012-06-16 22:48:21 +02:00
punycode.py remove pointless coding cookies 2010-08-30 14:05:50 +00:00
quopri_codec.py Issue #19619: Blacklist non-text codecs in method API 2014-02-24 14:43:03 +02:00
raw_unicode_escape.py Merge part of the trunk changes into the p3yk branch. This merges from 43030 2006-04-21 09:43:23 +00:00
rot_13.py Issue #19619: Blacklist non-text codecs in method API 2014-02-24 14:43:03 +02:00
shift_jis.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
shift_jis_2004.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
shift_jisx0213.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
tis_620.py Rip out all the u"..." literals and calls to unicode(). 2007-05-02 19:09:54 +00:00
undefined.py Merge part of the trunk changes into the p3yk branch. This merges from 43030 2006-04-21 09:43:23 +00:00
unicode_escape.py Merge part of the trunk changes into the p3yk branch. This merges from 43030 2006-04-21 09:43:23 +00:00
unicode_internal.py Merge part of the trunk changes into the p3yk branch. This merges from 43030 2006-04-21 09:43:23 +00:00
utf_7.py Merged revisions 59056-59076 via svnmerge from 2007-11-20 23:38:09 +00:00
utf_8.py Merge part of the trunk changes into the p3yk branch. This merges from 43030 2006-04-21 09:43:23 +00:00
utf_8_sig.py Merged revisions 59041-59055 via svnmerge from 2007-11-19 18:03:44 +00:00
utf_16.py Merged revisions 81471-81472 via svnmerge from 2010-05-22 16:59:09 +00:00
utf_16_be.py Merge part of the trunk changes into the p3yk branch. This merges from 43030 2006-04-21 09:43:23 +00:00
utf_16_le.py Merge part of the trunk changes into the p3yk branch. This merges from 43030 2006-04-21 09:43:23 +00:00
utf_32.py Merged revisions 81471-81472 via svnmerge from 2010-05-22 16:59:09 +00:00
utf_32_be.py Apply SF patch #1775604: This adds three new codecs (utf-32, utf-32-le and 2007-08-16 21:55:45 +00:00
utf_32_le.py Apply SF patch #1775604: This adds three new codecs (utf-32, utf-32-le and 2007-08-16 21:55:45 +00:00
uu_codec.py Issue #19619: Blacklist non-text codecs in method API 2014-02-24 14:43:03 +02:00
zlib_codec.py Issue #19619: Blacklist non-text codecs in method API 2014-02-24 14:43:03 +02:00