8000 bpo-41194: The _ast module cannot be loaded more than once by vstinner · Pull Request #21290 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-41194: The _ast module cannot be loaded more than once #21290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-41194: The _ast module cannot be loaded more than once
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.
  • Loading branch information
vstinner committed Jul 3, 2020
commit e5d301a41b461ea812e418a260dc40b551e6da71
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
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.
71 changes: 32 additions & 39 deletions Parser/asdl_c.py