]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42639: Move atexit state to PyInterpreterState (GH-23763)
authorVictor Stinner <vstinner@python.org>
Tue, 15 Dec 2020 13:34:19 +0000 (14:34 +0100)
committerGitHub <noreply@github.com>
Tue, 15 Dec 2020 13:34:19 +0000 (14:34 +0100)
commitb8fa135908d294b350cdad04e2f512327a538dee
tree25b6b1516e3f6d29c9cf3cafb71c516cbc93a3c3
parent8473cf89bdbf2cb292b39c972db540504669b9cd
bpo-42639: Move atexit state to PyInterpreterState (GH-23763)

* Add _PyAtExit_Call() function and remove pyexitfunc and
  pyexitmodule members of PyInterpreterState. The function
  logs atexit callback errors using _PyErr_WriteUnraisableMsg().
* Add _PyAtExit_Init() and _PyAtExit_Fini() functions.
* Remove traverse, clear and free functions of the atexit module.

Co-authored-by: Dong-hee Na <donghee.na@python.org>
Include/internal/pycore_interp.h
Include/internal/pycore_pylifecycle.h
Lib/test/test_atexit.py
Misc/NEWS.d/next/Core and Builtins/2020-12-09-01-55-10.bpo-42639.5pI5HG.rst [new file with mode: 0644]
Modules/atexitmodule.c
Python/pylifecycle.c
Python/pystate.c