[New-bugs-announce] [issue12273] Change ast.__version__ calculation to provide consistent ordering

Nick Coghlan report at bugs.python.org
Tue Jun 7 06:12:14 CEST 2011


New submission from Nick Coghlan <ncoghlan at gmail.com>:

Benjamin's AST modification checkins switched directly from the SVN revision number (as a string) to the hg revision hash.

While that preserves uniqueness, it makes ordering difficult to determine.

The last AST version in 3.2 was '82163' (and it was '82160' in 2.7).

I would like to change the version number calculation to something like:

  '9.x.y.zzzzzzz'

where

  9 is a prefix to get 3.3+ ast.__version__ values to sort higher than earlier versions
  x.y is the Python version so later versions sort higher than earlier versions in the future
  zzzzzz is the hg version id, so versions during development of a release remain unique, even if they can't be readily ordered.

This would require changes to ast.py (to add the 9.x.y prefix) and to release.py (to check that the 'x.y' prefix is correct in the current release)

----------
assignee: ncoghlan
components: Library (Lib)
messages: 137786
nosy: benjamin.peterson, brett.cannon, ncoghlan
priority: normal
severity: normal
status: open
title: Change ast.__version__ calculation to provide consistent ordering
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12273>
_______________________________________


More information about the New-bugs-announce mailing list