]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-126004: Fix positions handling in `codecs.backslashreplace_errors` (#127676)
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Thu, 23 Jan 2025 13:28:33 +0000 (14:28 +0100)
committerGitHub <noreply@github.com>
Thu, 23 Jan 2025 13:28:33 +0000 (14:28 +0100)
commit25a614a502e607a333f7aa7f4d69e6f2a47148ad
tree89fbe1ef7ef10eb3ac1e784f23e8744dc7c2c424
parent5c9a63f62c9e56d1576c2dc62c986f2be988729f
gh-126004: Fix positions handling in `codecs.backslashreplace_errors` (#127676)

This fixes how `PyCodec_BackslashReplaceErrors` 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-30-58.gh-issue-126004.-p8MAS.rst [new file with mode: 0644]
Python/codecs.c