[Python-Dev] Expected stability of PyCode_New() and types.CodeType() signatures (original) (raw)

Simon Cross hodgestar+pythondev at gmail.com
Fri May 31 17:28:42 EDT 2019


As the maintainer of Genshi, one the libraries affected by the CodeType and similar changes, I thought I could add a users perspective to the discussion:

Genshi is a templating engine that parses Python code from inside its templates. It supports Python 2.6+, 3.2+, pypy2 and pypy3. It parses Python using compile(...) and then walks the AST to, for example, translate variable lookups into template context lookups.

Pretty much every major release of Python has broken Genshi's Python parsing in some way. While on the one hand this is a bit annoying, I also don't want Python to stop evolving where it makes sense.

My requests to core developers are largely pragmatic:

Also many thanks to the core developers who've submitted patches to update Genshi in the past -- that was awesome of you.

The new CodeType.replace will remove some potential sources of breakages in the future, so thank you very much for adding that.

Schiavo Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20190531/1800d427/attachment.html>



More information about the Python-Dev mailing list