[Distutils] recollections of Pycon distutils versioning discussion (part 2)
Ben Finney
ben+python at benfinney.id.au
Fri Jun 12 01:50:59 CEST 2009
Ben Finney <ben+python at benfinney.id.au> writes:
> Note that the specification I propose allows any alphanumeric
> character [0-9A-Za-z], so you could also make the version string
> ‘8.2.0.r27002’ if you want the “revision number” component to be
> visibly different while still having an obvious sequencing semantic.
Ben Finney <ben+python at benfinney.id.au> writes:
> My understanding is the above version strings should be compared by the
> following rules:
>
> * A version string is interpreted as a tuple of components. Each
> component is a sequence of characters from the set [0-9A-Za-z]. Each
> component is separated from others by a single full-stop (‘.’)
> character.
[…]
>
> * Contiguous sequences of digits are interpreted as integers and
> compared numerically; other characters compare as per the ASCII
> character set sequence.
I realise now that this has an unintended effect: that version strings
which have letters in differing case will compare ASCIIbetically, which
may be non-obvious:
1.2.C1
1.2.D1
1.2.REV876
1.2.a1
1.2.b1
1.2.rev543
I hereby simplify the above specification and its semantics, by
declaring upper-case letters outside the scope of a version string. A
component can have characters from the set [0-9a-z], removing the above
cases of non-obvious comparison.
1.2.a1
1.2.b1
1.2.c1
1.2.d1
1.2.rev543
1.2.rev876
--
\ “The process by which banks create money is so simple that the |
`\ mind is repelled.” —John Kenneth Galbraith, _Money: Whence It |
_o__) Came, Where It Went_, 1975 |
Ben Finney
More information about the Distutils-SIG
mailing list