]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-91555: disable logger while handling log record (GH-131812) (GH-133899)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 12 May 2025 12:02:21 +0000 (14:02 +0200)
committerGitHub <noreply@github.com>
Mon, 12 May 2025 12:02:21 +0000 (13:02 +0100)
commitcedc37a89497a7860009c1153bd38eed9faa67f3
tree8330fecd53892b6d8a80bcdcd9cd0b13d27c3e13
parentf5d2d73995cc9cc8dde841b50e701bdd163b23d8
[3.14] gh-91555: disable logger while handling log record (GH-131812) (GH-133899)

Prevent the possibility of re-entrancy leading to deadlock or infinite recursion (caused by logging triggered by logging), by disabling logging while the logger is handling log messages.
(cherry picked from commit 2561e148ec985755baa3984b91fd0bfc089b283c)

Co-authored-by: Duane Griffin <duaneg@dghda.com>
Lib/logging/__init__.py
Lib/test/test_logging.py
Misc/NEWS.d/next/Library/2025-03-30-16-42-38.gh-issue-91555.ShVtwW.rst [new file with mode: 0644]