]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-140530: fix a reference leak in an error path for `raise exc from cause...
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sun, 9 Nov 2025 14:57:26 +0000 (15:57 +0100)
committerGitHub <noreply@github.com>
Sun, 9 Nov 2025 14:57:26 +0000 (15:57 +0100)
commit718886f6c6f1b1a11121263dff7ce4b7fa5bbcf2
tree683f0fa72a1f889cc95718ffcfed929dcf1eec4d
parent873f0d023cafe20876c2df2830ff31c226bb6280
[3.13] gh-140530: fix a reference leak in an error path for `raise exc from cause` (GH-140908) (#141283)

gh-140530: fix a reference leak in an error path for `raise exc from cause` (#140908)

Fix a reference leak in `raise E from T` when `T` is an exception
subtype for which `T.__new__` does not return an exception instance.

(cherry picked from commit 0c77e7c23b5c270a3142105542c56c59b59c52a0)
Lib/test/test_raise.py
Misc/NEWS.d/next/Core and Builtins/2025-11-02-12-47-38.gh-issue-140530.S934bp.rst [new file with mode: 0644]
Python/ceval.c