commit | c72e4e6dccce99bcdcb45959767436d7e5cfda8c | [log] [tgz] |
---|---|---|
author | Nick Coghlan <ncoghlan@gmail.com> | Fri Nov 22 22:39:36 2013 +1000 |
committer | Nick Coghlan <ncoghlan@gmail.com> | Fri Nov 22 22:39:36 2013 +1000 |
tree | 029832d80cc82a039dc1014302c9eb9dd2214543 | |
parent | 322f5ba0d8d5e8a9cd2a134fa215884b4cbc373d [diff] |
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.