-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
_ast module state should be made per interpreter #85962
Comments
In September 2019, the _ast extension module was converted to PEP-384 (stable ABI): bpo-38113. In bpo-41631, I moved the _ast module state back to a global state, rather than a regular module state, to fix multiple bugs. The state should be made per intepreter (moved into PyInterpreterState). Also, each interpreter should have its own _ast types (_ast.AST, _ast.Constant, etc.), rather than sharing all types. Hopefully, in 3.9, _ast types have been converted to heap types. To fix bpo-41631, I wanted to convert _ast.AST heap type back into a static type, to prevenet a subinterpreter to modify it, but Petr Viktorin asked me to leave it as it is: I agree since I would like to convert all static types to heap types: bpo-40077. |
I started this here: 60960cb |
Oh thanks! I was looking for your work, but I failed to find it. It is really helpful! I started to hack asdl_c.py locally, but Pablo asked me in private to wait a few days, since he is going to push large changes on this file soon. This issue is an enhancement which can wait. |
There is a leak (I just marked bpo-42250 as duplicate of this issue): https://buildbot.python.org/all/#/builders/205/builds/83 OK test_subinterpreter() test leaks. There are two problems:
|
The leak is fixed, I close again the issue. Thanks for the report Pablo. |
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:
The text was updated successfully, but these errors were encountered: