[Distutils] RFC : Version comparison
Trent Mick
trentm at gmail.com
Mon Apr 27 18:17:27 CEST 2009
> (Btw, the wiki page pseudo-regex doesn't match what the code actually parses, either.)
Current: N.N[.N]+[abc]N[.N]+[.(dev|post)N+]
Admittedly that is just trying to be illustrative without being too
"syntax-y", but perhaps it is more confusing than helpful. Ultimately
I think the docs might be most helpful by just giving examples of
valid version strings for different use cases. Something like:
Basic versions:
1.0 # there must be at least two numbers (e.g. just "1" is not allowed)
1.5.3.2 # any number of dotted segments more than two are allowed
Alphas, betas and release candidates (they must be numbered):
1.0a1 # the first alpha on the way to "1.0"
3.1b1 # the first beta
5.0c3 # the third release candidate for "5.0"
Any number of additional dotted segments are allowed
1.0a1.1 # a quick update to the "1.0a1" was necessary (personal
note: I'd tend to do a "1.0a2" release, but sometimes that might not
be feasible)
... and so on describing the use cases for "dev" (pre-) releases and
"post" releases.
--
Trent Mick
trentm at gmail.com
More information about the Distutils-SIG
mailing list