gh-67056: document that registering/unregistering an atexit func from within an atexit func is undefined (#104473)

This commit is contained in:
Irit Katriel 2023-05-15 09:12:52 +01:00 committed by GitHub
parent 146106a0f1
commit b15a1a6ac6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -20,6 +20,9 @@ at interpreter termination time they will be run in the order ``C``, ``B``,
program is killed by a signal not handled by Python, when a Python fatal
internal error is detected, or when :func:`os._exit` is called.
**Note:** The effect of registering or unregistering functions from within
a cleanup function is undefined.
.. versionchanged:: 3.7
When used with C-API subinterpreters, registered functions
are local to the interpreter they were registered in.

View file

@ -0,0 +1,2 @@
Document that the effect of registering or unregistering an :mod:`atexit`
cleanup function from within a registered cleanup function is undefined.