[Python-Dev] Policy for making changes to the AST (original) (raw)

Guido van Rossum guido at python.org
Mon Apr 4 04:02:33 CEST 2011


On Sun, Apr 3, 2011 at 6:43 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:

On Mon, Apr 4, 2011 at 5:11 AM, Guido van Rossum <guido at python.org> wrote:

In the mean time, until we hear differently, I'm also in favor of #1 (do nothing). I would (perhaps redundantly) say that such changes should only go into new major releases (i.e. 3.3 right now), not backported into bugfix releases (e.g. 3.2.1). AFAIK the AST is CPython-specific so should be treated with the same attitude as changes to the bytecode. That means, do it conservatively, since there are people who like to write tools that manipulate or analyze this, and while they know they're doing something CPython and version-specific, they should not be broken by bugfix releases, since the people who use their code probably have no idea of the deep magic they're depending on. Perhaps we should add a warning to the ast module docs similar to the one we have for the dis module, and use it to explicitly remind people to check ast.version before proceeding with AST manipulation?

Sure, but do we have any indication that the warnings for dis make a difference?

-- --Guido van Rossum (python.org/~guido)



More information about the Python-Dev mailing list