summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-12-14 22:07:54 (GMT)
committerGitHub <noreply@github.com>2020-12-14 22:07:54 (GMT)
commit357704c9f2375f29ed5b3a93adac086fa714538d (patch)
tree8b69403f419da52a6728c8557e1169aaf23c9e2e /Doc/whatsnew
parent83d52044ae4def1e8611a4b1b9263b850ca5c458 (diff)
downloadcpython-357704c9f2375f29ed5b3a93adac086fa714538d.zip
cpython-357704c9f2375f29ed5b3a93adac086fa714538d.tar.gz
cpython-357704c9f2375f29ed5b3a93adac086fa714538d.tar.bz2
bpo-42639: atexit now logs callbacks exceptions (GH-23771)
At Python exit, if a callback registered with atexit.register() fails, its exception is now logged. Previously, only some exceptions were logged, and the last exception was always silently ignored. Add _PyAtExit_Call() function and remove PyInterpreterState.atexit_func member. call_py_exitfuncs() now calls directly _PyAtExit_Call(). The atexit module must now always be built as a built-in module.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.10.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index 23e28aa..b690f8d 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -501,6 +501,13 @@ Changes in the Python API
have been renamed to *exc*.
(Contributed by Zackery Spytz and Matthias Bussonnier in :issue:`26389`.)
+* :mod:`atexit`: At Python exit, if a callback registered with
+ :func:`atexit.register` fails, its exception is now logged. Previously, only
+ some exceptions were logged, and the last exception was always silently
+ ignored.
+ (Contributed by Victor Stinner in :issue:`42639`.)
+
+
CPython bytecode changes
========================
@@ -519,6 +526,8 @@ Build Changes
* :mod:`sqlite3` requires SQLite 3.7.3 or higher.
(Contributed by Sergey Fedoseev and Erlend E. Aasland :issue:`40744`.)
+* The :mod:`atexit` module must now always be built as a built-in module.
+ (Contributed by Victor Stinner in :issue:`42639`.)
C API Changes