New submission from Antoine Pitrou <solip...@pitrou.net>:
A number of codecs raise bare UnicodeError, rather than Unicode{Decode,Encode}Error. Example: File "/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/encodings/utf_16.py", line 67, in _buffer_decode raise UnicodeError("UTF-16 stream does not start with BOM") A more complete list can be found here: https://gist.github.com/pitrou/60594b28d8e47edcdb97d9b15d5f9866 ---------- components: Library (Lib) keywords: easy messages: 372367 nosy: benjamin.peterson, ezio.melotti, lemburg, pitrou, serhiy.storchaka, vstinner priority: normal severity: normal stage: needs patch status: open title: Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41115> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com