]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-126004: Fix positions handling in `codecs.replace_errors` (#127674)
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Thu, 23 Jan 2025 10:44:18 +0000 (11:44 +0100)
committerGitHub <noreply@github.com>
Thu, 23 Jan 2025 10:44:18 +0000 (11:44 +0100)
commit225296cd5b505c180d3f45c355b43d7e1d99d3d5
tree1d2bad5590eafbf86effdd102fc4ab506dc3fac1
parent70dcc847df4eb32367859bfa168f057e43eed11e
gh-126004: Fix positions handling in `codecs.replace_errors` (#127674)

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