Guido van Rossum <gu...@python.org> added the comment:

Yeah, this definitely changed. When we updated typed_ast to Python 3.7 
recently, the mypy project looked into making certain arguments to AST certain 
nodes optional, but the code responsible for those arguments is too weird to 
easily make that work (it's all generated), so we decided to leave it alone.

IMO the AST in general can't be considered a stable API like other stdlib APIs, 
since when the syntax changes, well, the AST changes, and sometimes that means 
that nodes change. For *consumers* of the AST we generally manage to keep 
things backwards compatible, but for producers, there just is no guarantee.

I think the best way forward is for your code to check the Python version and 
if it's >= 3.8, pass an empty list as the second argument to Module().

If you look at the changes to Python.asdl in the PR you found, you'll see what 
other nodes have changed.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35894>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to