alonho/pql

Compatibility with Python 3.8

MPSystemsServices opened this issue · 2 comments

The Python ast module, which this library depends on has been changed in more recent versions of Python. For sure 3.8, and possibly 3.7 or earlier. The ast parser assigns a value of "Constant" to quoted strings and constant numeric values to the right of the comparison expression. When this is handled by the resolve() method, the string "Constant" is appended to "handle_" and then the getattr() method fails because none of the field handler functions have a handle_Constant() function. Hoping that this issue can be fixed.

You're right! I ran the example statement on python 3.8 (pql.find("a > 1 and b == 'foo' or not c.d == False")) and this is the error message I got:
image

Same issue here, unfortunately.