New submission from Brian Carlson <briancarlson6...@gmail.com>:
Test file linked. When unparsing the output from ast.parse on a simple class, unparse throws an error: 'FunctionDef' object has no attribute 'lineno' for a valid class and valid AST. It fails when programmatically building the module AST as well. It seems to be from this function: https://github.com/python/cpython/blob/1cbb88736c32ac30fd530371adf53fe7554be0a5/Lib/ast.py#L790 ---------- components: Library (Lib) files: test.py messages: 408546 nosy: TheRobotCarlson priority: normal severity: normal status: open title: ast.unparse produces: 'FunctionDef' object has no attribute 'lineno' for valid module type: crash versions: Python 3.10, Python 3.11, Python 3.9 Added file: https://bugs.python.org/file50490/test.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46073> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com