simplified codecs not accepting error arguments
It seems there is code in the wild that registers codecs that don't accept an error argument at all:
https://github.com/modoboa/modoboa/blob/master/modoboa/lib/imap_utf7.py#L74
(reported here: https://twitter.com/patthemav/status/1102059893438246912 )
The attached file reproduces the problem. CPython seems to have complicated logic to actually not pass a second argument in some cases (see Python/codecs.c
).
Attachments: bug.py