Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
functemplate: Adapt ast syntax to PEP570 changes on python3.8 #3278
Python 3.8 adds the required
There's some discussion about similar breaking API changes (namely in the inspect module) here and here, which however does not mention the lower level ast syntax changes, so I'm assuming that the ast module is supposed to always reflect the grammer such that this is not to be considered a regression.
Does this warrant a changelog entry? Due to the werkzeug incompatibility, Python 3.8 still is not fully supported.
Thanks for pointing this out! It is sort of frustrating that these AST incompatibilities keep cropping up, but I think that's unavoidable.
For a small improvement in legibility/maintainability, what do you think about using a "feature test" instead of a version check to see whether the appropriate field needs to be included? The
>>> 'kwonlyargs' in ast.arguments._fields True >>> 'posonlyargs' in ast.arguments._fields False
I think a short changelog entry might be a good idea, even if we need to mention that "real" Python 3.8 compatibility will need to wait for Werkzeug. Especially because Werkzeug is not a "core" dependency (it's only necessary for the web plugin).