This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Clear _PyRuntime at exit
Type: Stage: resolved
Components: Interpreter Core, Subinterpreters Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: eric.snow, vstinner
Priority: normal Keywords: patch

Created on 2019-04-25 20:13 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 12963 merged vstinner, 2019-04-26 03:32
Messages (4)
msg340859 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-04-25 20:13
_PyRuntime.warnings is not cleared at Python exit: 3 objects are kept alive even after Py_Finalize().

See bpo-36356 which cleared some other variables.

PR 12453 "bpo-36356: Destroy the GIL at exit" is still open.
msg340881 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-04-26 03:49
New changeset 87d23a041d9efb743c5680ac23305ddddf300e51 by Victor Stinner in branch 'master':
bpo-36724: Add _PyWarnings_Fini() (#12963)
https://github.com/python/cpython/commit/87d23a041d9efb743c5680ac23305ddddf300e51
msg344564 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-06-04 13:01
bpo-36818 caused a regression: https://bugs.python.org/issue37135#msg344511

We should be careful when we modify Python finalization, especially with daemon threads.
msg370743 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-06-05 01:13
> _PyRuntime.warnings is not cleared at Python exit: 3 objects are kept alive even after Py_Finalize().

This issue has been fixed. Moreover, the GC state is now per-interpreter.
History
Date User Action Args
2022-04-11 14:59:14adminsetgithub: 80905
2020-06-05 01:13:10vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg370743

stage: patch review -> resolved
2020-06-03 16:41:14vstinnersetcomponents: + Subinterpreters
2019-06-04 13:01:52vstinnersetmessages: + msg344564
2019-04-26 03:49:29vstinnersetmessages: + msg340881
2019-04-26 03:32:28vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request12889
2019-04-25 20:13:49vstinnercreate