Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

I am working on it, since it is more complex issue, and PR 13134 does not solve 
it.

1. This bug affects also other codecs implemented in C: ASCII, Latin1, UTF-8, 
etc.
2. It still crashes in UTF-16/32 encoders if the error handler returns a 
position less than the current position.
3. Incorrect exception can be raised if the error handler returns invalid 
string/bytes: a non-ASCII string or a bytes object consisting of not a whole 
number of units.
4. The code for standard error handlers and for decoders needs a revision too. 
I have some suspects.

We could just forbid error handlers returning position not in the range (start 
, end], but it can break some code, so it is better to do this only in a new 
release.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36819>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to