Repository navigation
PyImport_Cleanup is called with builtins_copy == NULL in test_embed #77560
Description
Activity
PyImport_Cleanup is called with builtins_copy == NULL in run_embedded_interpreter() in Lib/test/test_embed.py. This error was silenced by calling PyErr_Clear(), but it still looks as error to me. It was exposed by PR 6606.
- added3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Apr 28, 2018 PyImport_Cleanup() is called in Py_EndInterpreter(), but Py_NewInterpreter() doesn't call _PyImport_Init() which initializes builtins_copy.
PyImport_Cleanup was renamed to finalize_modules in:
commit dff1ad5 (HEAD, refs/bisect/bad)
Author: Victor Stinner vstinner@python.org
Date: Fri Oct 30 18:03:28 2020 +0100bpo-42208: Move _PyImport_Cleanup() to pylifecycle.c (GH-23040) Move _PyImport_Cleanup() to pylifecycle.c, rename it to finalize_modules(), split it (200 lines) into many smaller sub-functions and cleanup the code.- added3.12only security fixesonly security fixesand removed3.8 (EOL)end of lifeend of life3.7 (EOL)end of lifeend of life
on Jun 25, 2022 PyImport_Cleanup is called with builtins_copy == NULL in run_embedded_interpreter() in Lib/test/test_embed.py.
I don't understand this statement. I need more context.
The code changed a lot since 2018. I close the issue.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields: