[Python-Dev] Policy for making changes to the AST
Nick Coghlan
ncoghlan at gmail.com
Mon Apr 4 03:43:46 CEST 2011
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?
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-Dev
mailing list