]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-126004: Fix positions handling in `codecs.xmlcharrefreplace_errors` (#127675)
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Thu, 23 Jan 2025 10:42:38 +0000 (11:42 +0100)
committerGitHub <noreply@github.com>
Thu, 23 Jan 2025 10:42:38 +0000 (11:42 +0100)
commit70dcc847df4eb32367859bfa168f057e43eed11e
tree0f4fb382df5696725844856285e996946574711f
parenta10f99375e7912df863cf101a38e9703cfcd72f1
gh-126004: Fix positions handling in `codecs.xmlcharrefreplace_errors` (#127675)

This fixes how `PyCodec_XMLCharRefReplaceErrors` handles the `start` and `end`
attributes of `UnicodeError` objects via the `_PyUnicodeError_GetParams` helper.
Lib/test/test_capi/test_codecs.py
Misc/NEWS.d/next/Core_and_Builtins/2024-12-06-11-17-46.gh-issue-126004.-p8MAS.rst [new file with mode: 0644]
Python/codecs.c