[New-bugs-announce] [issue39999] Fix some issues with AST node classes

Serhiy Storchaka report at bugs.python.org
Wed Mar 18 05:38:50 EDT 2020


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

The proposed PR fixes some issues related to recent changes in the AST node classes.

1. Re-add removed classes Suite, Param, AugLoad and AugStore. They are not used in Python 3, are not created by the parser and are not accepted by the compiler. Param was used in 2.7, other classes were not used longer time. But some third-party projects (e.g. pyflakes) use them for isinstance checks.

2. Add docstrings for all dummy AST classes (Constant subclasses, Index, ExtTuple and the above four classes). Otherwise they inherited docstrings from the parent class.

3. Add docstrings for all attribute aliases.

4. Set __module__ = "ast" instead of "_ast" for all classes defined in the _ast module. Otherwise the help for the ast module would show only dummy classes, not actual AST node classes. It also makes pickles more compatible between versions.

----------
components: Library (Lib)
messages: 364504
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Fix some issues with AST node classes
type: enhancement
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39999>
_______________________________________


More information about the New-bugs-announce mailing list