diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-03-22 18:33:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-22 18:33:34 (GMT) |
commit | bace59d8b8e38f5c779ff6296ebdc0527f6db14a (patch) | |
tree | 81aa39edc1e15004da1d54507484609ab0745e22 /Parser/asdl_c.py | |
parent | 044cf94f610e831464a69a8e713dad89878824ce (diff) | |
download | cpython-bace59d8b8e38f5c779ff6296ebdc0527f6db14a.zip cpython-bace59d8b8e38f5c779ff6296ebdc0527f6db14a.tar.gz cpython-bace59d8b8e38f5c779ff6296ebdc0527f6db14a.tar.bz2 |
bpo-39999: Improve compatibility of the ast module. (GH-19056)
* Re-add removed classes Suite, slice, Param, AugLoad and AugStore.
* Add docstrings for dummy classes.
* Add docstrings for attribute aliases.
* Set __module__ to "ast" instead of "_ast".
Diffstat (limited to 'Parser/asdl_c.py')
-rwxr-xr-x | Parser/asdl_c.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index 478f0e8..bd22fb6 100755 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -774,7 +774,7 @@ static PyType_Slot AST_type_slots[] = { }; static PyType_Spec AST_type_spec = { - "_ast.AST", + "ast.AST", sizeof(AST_object), 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, @@ -800,7 +800,7 @@ make_type(const char *type, PyObject* base, const char* const* fields, int num_f type, base, astmodulestate_global->_fields, fnames, astmodulestate_global->__module__, - astmodulestate_global->_ast, + astmodulestate_global->ast, astmodulestate_global->__doc__, doc); Py_DECREF(fnames); return result; @@ -1302,7 +1302,7 @@ def generate_module_def(f, mod): visitor_list.add(visitor) state_strings = { - "_ast", + "ast", "_fields", "__doc__", "__dict__", |