[New-bugs-announce] [issue17840] base64_codec uses assert for runtime validity checks

Nick Coghlan report at bugs.python.org
Thu Apr 25 09:40:50 CEST 2013


New submission from Nick Coghlan:

encodings.base64_codec currently uses "assert errors=='strict'" in a few places, since it doesn't actually support any of the Unicode specific error handling modes.

This should either be discarded entirely (and document that the error handling mode is irrelevant for this codec), or else turned into a real check that raises ValueError if an unsupported error mode is passed in.

I have a slight preference for just ignoring the error mode as irrelevant (since this isn't a text encoding in the normal Unicode serialisation-as-bytes sense).

----------
components: Library (Lib)
messages: 187762
nosy: ncoghlan
priority: normal
severity: normal
stage: test needed
status: open
title: base64_codec uses assert for runtime validity checks
type: behavior
versions: Python 3.4

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


More information about the New-bugs-announce mailing list