aboutsummaryrefslogtreecommitdiff
path: root/Misc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-05-27 15:56:36 -0700
committerGitHub <noreply@github.com>2020-05-27 15:56:36 -0700
commit45ce0dbc4f8c68fe22ae97860faa8f2ec7faf27b (patch)
treedda2e1b4530621fb3f0d7e6f0c55d9efd1a45617 /Misc
parentbpo-40025: Require _generate_next_value_ to be defined before members(GH-19763) (diff)
downloadcpython-45ce0dbc4f8c68fe22ae97860faa8f2ec7faf27b.tar.gz
cpython-45ce0dbc4f8c68fe22ae97860faa8f2ec7faf27b.tar.bz2
cpython-45ce0dbc4f8c68fe22ae97860faa8f2ec7faf27b.zip
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(). (cherry picked from commit 10228bad0452d94e66c964b625a0b61befa08e59) Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2020-05-27-17-00-18.bpo-40795.eZSnHA.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2020-05-27-17-00-18.bpo-40795.eZSnHA.rst b/Misc/NEWS.d/next/Library/2020-05-27-17-00-18.bpo-40795.eZSnHA.rst
new file mode 100644
index 00000000000..dd02fb05cab
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2020-05-27-17-00-18.bpo-40795.eZSnHA.rst
@@ -0,0 +1,4 @@
+:mod:`ctypes` module: 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 :c:func:`PyErr_Print`.