]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40795: ctypes calls unraisablehook with an exception (GH-20452)
authorVictor Stinner <vstinner@python.org>
Wed, 27 May 2020 22:38:12 +0000 (00:38 +0200)
committerGitHub <noreply@github.com>
Wed, 27 May 2020 22:38:12 +0000 (00:38 +0200)
commit10228bad0452d94e66c964b625a0b61befa08e59
tree26a37fc4fd1292e754aff8e7d546365bf9af43a7
parente80697d687b610bd7fb9104af905dec8f0bc55a7
bpo-40795: ctypes calls unraisablehook with an exception (GH-20452)

If ctypes fails to convert the result of a callback or if a ctypes
callback function raises an exception, sys.unraisablehook is now
called with an exception set. Previously, the error was logged into
stderr by PyErr_Print().
Lib/ctypes/test/test_callbacks.py
Lib/ctypes/test/test_random_things.py
Lib/ctypes/test/test_unaligned_structures.py
Misc/NEWS.d/next/Library/2020-05-27-17-00-18.bpo-40795.eZSnHA.rst [new file with mode: 0644]
Modules/_ctypes/callbacks.c
Modules/_ctypes/callproc.c