Serhiy Storchaka <[email protected]> added the comment:
This is not a new case. This is exactly the same problem which has already been
fixed in multiple other projects.
Could you show your real code Anthony? In all known opensource examples
(astroid, pyflakes, genshi, chameleon, mako) the compatibility fix is as simple
as
def visit_Constant(self, node):
if node.value is Ellipsis:
self._write('...')
else:
self._write(repr(node.value))
In return, you can remove several methods, such as visit_Str, visit_Num, etc,
once you drop the support of Python versions <3.8.
AST is not stable. Virtually in every version the new nodes are added: for
asynchronous constructions, for f-strings, etc, and the structure and meaning
of existing nodes can be changed.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36917>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com