STINNER Victor <vstin...@python.org> added the comment:
About subinterpreters. In Python 3.8, _ast.AST type is a static type: static PyTypeObject AST_type = {...}; In Python 3.9, it's now a heap type: static PyType_Spec AST_type_spec = {...}; state->AST_type = PyType_FromSpec(&AST_type_spec); In Python 3.8, the same _ast.AST type was shared by all interpreters. With my PR 21961, the _ast.AST type is a heap type but it is also shared by all interpreters. Compared to Python 3.8, PR 21961 has no regression related to subinterpreters. It's not better nor worse. The minor benefit is that _ast.AST is cleared at Python exit (see _PyAST_Fini()). While I would be nice to make _ast.AST per interpreter, it would be an *enhancement*. I consider that it can wait for Python 3.10. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41631> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com