]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.10] gh-91924: Fix __ltrace__ for non-UTF-8 stdout encoding (#93214)
authorVictor Stinner <vstinner@python.org>
Wed, 25 May 2022 22:16:32 +0000 (00:16 +0200)
committerGitHub <noreply@github.com>
Wed, 25 May 2022 22:16:32 +0000 (00:16 +0200)
commit9369942054fe3fe389f4f4ff808d33c5d7945052
tree4f9b6e47cd432c374822e7d4f348f005d9062394
parent02d35fc4ef8a718e74ab97402b6d8371b69d3635
[3.10] gh-91924: Fix __ltrace__ for non-UTF-8 stdout encoding (#93214)

Fix __ltrace__ debug feature if the stdout encoding is not UTF-8.

If the stdout encoding is not UTF-8, the first call to
lltrace_resume_frame() indirectly sets lltrace to 0 when calling
unicode_check_encoding_errors() which calls
encodings.search_function().

Add test_lltrace.test_lltrace() test.
Lib/test/test_lltrace.py
Misc/NEWS.d/next/Core and Builtins/2022-05-25-04-07-22.gh-issue-91924.-UyO4q.rst [new file with mode: 0644]
Python/ceval.c