mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00
[3.9] bpo-41194: The _ast module cannot be loaded more than once (GH-21290) (GH-21292)
* bpo-41194: Pass module state in Python-ast.c (GH-21284) Rework asdl_c.py to pass the module state to functions in Python-ast.c, instead of using astmodulestate_global. Handle also PyState_AddModule() failure in init_types(). (cherry picked from commit74419f0c64
) * bpo-41194: The _ast module cannot be loaded more than once (GH-21290) Fix a crash in the _ast module: it can no longer be loaded more than once. It now uses a global state rather than a module state. * Move _ast module state: use a global state instead. * Set _astmodule.m_size to -1, so the extension cannot be loaded more than once. (cherry picked from commit91e1bc18bd
)
This commit is contained in:
parent
486c256bdf
commit
f8599279b6
3 changed files with 2093 additions and 2182 deletions
4066
Python/Python-ast.c
generated
4066
Python/Python-ast.c
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue