]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-155006: Encode an error handler's replacement strictly (GH-155008)
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 2 Aug 2026 15:20:48 +0000 (18:20 +0300)
committerGitHub <noreply@github.com>
Sun, 2 Aug 2026 15:20:48 +0000 (18:20 +0300)
commit685ad027478d3c16e9843bb20ddec4711da3fcd0
tree414875a638800695b51208992c19e1a9dded7962
parent04a1fcfdabb3a9d61cc247dfec13d601ce3398e9
gh-155006: Encode an error handler's replacement strictly (GH-155008)

Encoding it with the same error handler could never terminate: a replacement
that is itself unencodable calls the handler again. A replacement that does
not fit is now reported against the input character.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Lib/test/test_codecs.py
Objects/unicodeobject.c