[issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode()

STINNER Victor report at bugs.python.org
Fri Nov 22 14:17:01 CET 2013


STINNER Victor added the comment:

Can we now remove wrap_codec_error()? And maybe more changes which were done to workaround issues with non-Unicode codecs. bytes.decode/str.encode should no more raise a TypeError with codecs of the Python standard library.

Related changesets:


changeset:   87267:04e1f701aeaa
user:        Nick Coghlan <ncoghlan at gmail.com>
date:        Tue Nov 19 22:33:10 2013 +1000
files:       Lib/test/test_codecs.py Objects/exceptions.c
description:
Also chain codec exceptions that allow weakrefs

The zlib and hex codecs throw custom exception types with
weakref support if the input type is valid, but the data
fails validation. Make sure the exception chaining in the
codec infrastructure can wrap those as well.


changeset:   87109:4ea622c085ca
user:        Nick Coghlan <ncoghlan at gmail.com>
date:        Fri Nov 15 21:47:37 2013 +1000
files:       Lib/test/test_codecs.py Python/codecs.c
description:
Close 19609: narrow scope of codec exc chaining


changeset:   87084:854a2cea31b9
user:        Nick Coghlan <ncoghlan at gmail.com>
date:        Wed Nov 13 23:49:21 2013 +1000
files:       Doc/whatsnew/3.4.rst Include/pyerrors.h Lib/test/test_codecs.py Misc/NEWS Objects/exceptions.c Objects/unicodeobject.c Python/codecs.c
description:
Close #17828: better handling of codec errors

- output type errors now redirect users to the type-neutral
  convenience functions in the codecs module
- stateless errors that occur during encoding and decoding
  will now be automatically wrapped in exceptions that give
  the name of the codec involved

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19619>
_______________________________________


More information about the Python-bugs-list mailing list