pql
pql copied to clipboard
Fixes exception due to ast parser changes.
I just wrote quick fix of #29 by producing handle_Constant()
method for each AstHandlers.
And the existing handle_Num()
, handle_Str()
, .. methods were left untouched to obtain backward compatibility.
See https://docs.python.org/3/library/ast.html#ast.NodeVisitor.generic_visit
since version 3.8: Methods visit_Num(), visit_Str(), visit_Bytes(), visit_NameConstant() and visit_Ellipsis() are deprecated now and will not be called in future Python versions. Add the visit_Constant() method to handle all constant nodes.
Would love to see this get merged in and released upstream to allow upgrades to python 3.8
@alonho is there anyway you could merge this and release a new version on pypy to allow for python 3.8 compatability?