macropy
macropy copied to clipboard
Make MacroPy3 compatible with Python 3.11
I made changes to comply with the following runtime changes.
In Python 3.8+, lineno/col_offset became required, as part of the adoption of the peg_parser.
In Python 3.8+, arguments has a new parameter - posonlyargs.
The value of Subscript.slice was changed from Index to expr in Python 3.9 as part of the "Parental Scope References in Named Expressions" proposal (PEP 572).
With these changes tests don't actually pass, but they do fail, which is an improvement. Before, we couldn't even run the tests. I'm not sure to what degree these failures are the results of real problems vs just needing to fix up the tests in response to runtime changes.