You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove various static state from the ast module and make it PEP-384 compatible. This will help make it be more compatible w/ subinterpreters and make it re-usable by 3rd party implementations.
This change introduced a subtle regression: bpo-41194. I modified the _ast module to use again a global state: (...)
Sadly, my fix doesn't work in all cases, there is yet another bug: bpo-41631 "_ast module: get_global_ast_state() doesn't work with Mercurial lazy import".
Activity
DinoV commentedon Sep 11, 2019
Remove various static state from the ast module and make it PEP-384 compatible. This will help make it be more compatible w/ subinterpreters and make it re-usable by 3rd party implementations.
DinoV commentedon Sep 11, 2019
Remove statics to make more compatible with subinterpreters.
[-]Make ast module PEP-384 compatible[/-][+]Remove statics from ast.c[/+]miss-islington commentedon Sep 11, 2019
New changeset 5b172c2 by Miss Islington (bot) (Dino Viehland) in branch 'master':
bpo-38113: Update Python/ast.c to PEP-384 (GH-15975)
5b172c2
ericsnowcurrently commentedon Sep 11, 2019
New changeset ac46eb4 by Eric Snow (Dino Viehland) in branch 'master':
bpo-38113: Update the Python-ast.c generator to PEP-384 (gh-15957)
ac46eb4
vstinner commentedon Sep 13, 2019
This change introduced tons of reference leaks, more than 21 test files leak references: see bpo-38152.
Please fix these leaks, or I will have to revert the change:
https://pythondev.readthedocs.io/ci.html#revert-on-fail
vstinner commentedon Jul 3, 2020
This change introduced a subtle regression: bpo-41194. I modified the _ast module to use again a global state:
New changeset 91e1bc1 by Victor Stinner in branch 'master':
bpo-41194: The _ast module cannot be loaded more than once (GH-21290)
91e1bc1
I also proposed PR 21293 to use again a module state, even if the implementation has some drawbacks (see the PR comments).
vstinner commentedon Aug 25, 2020
Sadly, my fix doesn't work in all cases, there is yet another bug: bpo-41631 "_ast module: get_global_ast_state() doesn't work with Mercurial lazy import".
ambv commentedon Sep 15, 2020
New changeset e5fbe0c by Victor Stinner in branch 'master':
bpo-41631: _ast module uses again a global state (bpo-21961)
e5fbe0c
ambv commentedon Sep 15, 2020
New changeset 55e0836 by Pablo Galindo in branch '3.9':
[3.9] bpo-41631: _ast module uses again a global state (GH-21961) (GH-22258)
55e0836