]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-19466: Py_Finalize() clears daemon threads earlier (GH-18848)
authorVictor Stinner <vstinner@python.org>
Mon, 9 Mar 2020 22:37:49 +0000 (23:37 +0100)
committerGitHub <noreply@github.com>
Mon, 9 Mar 2020 22:37:49 +0000 (23:37 +0100)
commit9ad58acbe8b90b4d0f2d2e139e38bb5aa32b7fb6
tree7678fd0af5dc8c6922aee830e7f5b106dae23539
parent8e9c47a947954c997d4b725f4551d50a1d896722
bpo-19466: Py_Finalize() clears daemon threads earlier (GH-18848)

Clear the frames of daemon threads earlier during the Python shutdown to
call objects destructors. So "unclosed file" resource warnings are now
emitted for daemon threads in a more reliable way.

Cleanup _PyThreadState_DeleteExcept() code: rename "garbage" to
"list".
Lib/test/test_threading.py
Misc/NEWS.d/next/Core and Builtins/2020-03-08-12-11-38.bpo-19466.OdOpXP.rst [new file with mode: 0644]
Python/pylifecycle.c
Python/pystate.c