]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-129502: Fix handling errors in ctypes callbacks (GH-129504) (#129639)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 4 Feb 2025 14:04:46 +0000 (16:04 +0200)
committerGitHub <noreply@github.com>
Tue, 4 Feb 2025 14:04:46 +0000 (15:04 +0100)
commit86451b146ac2a42a2ceb602f9d10c769d39ab69d
tree3ffb52384e1f20e18a1093d0ceed314af2735b9c
parent4879257d0cb6ea2f6d50a85cec7f5e259483f603
[3.12] gh-129502: Fix handling errors in ctypes callbacks (GH-129504) (#129639)

Unlikely errors in preparing arguments for ctypes callback are now
handled in the same way as errors raised in the callback of in converting
the result of the callback -- using sys.unraisablehook() instead of
sys.excepthook() and not setting sys.last_exc and other variables.
(cherry picked from commit 9d63ae5fe52d95059ab1bcd4cbb1f9e17033c897)
Misc/NEWS.d/next/Library/2025-01-31-11-14-05.gh-issue-129502.j_ArNo.rst [new file with mode: 0644]
Modules/_ctypes/callbacks.c