donkirkby / live-py-plugin

Live coding in Python with PyCharm, Emacs, Sublime Text, or even a browser
https://donkirkby.github.io/live-py-plugin
MIT License
290 stars 57 forks source link

Fix deprecation warnings for AST classes #568

Closed donkirkby closed 1 month ago

donkirkby commented 9 months ago

As part of fixing #567, I saw new deprecation warnings about old classes that will be removed in Python 3.14. It's easy to replace instantiations of the old classes with Constant(), but I don't know how to replace the type checks.

    if isinstance(try_body[0], Expr) and isinstance(try_body[0].value, Str):

and

        if (isinstance(slice_node, Ellipsis) or
                isinstance(slice_node.value, Ellipsis)):