On Aug 16, 2014, at 11:37 AM, Jason R. Coombs <jaraco@jaraco.com> wrote:

Thanks Donald for the extensive work on this. It all looks generally good.
One thing that stuck out as slightly surprising – the use of ‘_’ as a separator. I imagine most people consider the underscore to be yet another alpha character, similar to [a-zA-Z]. If it is to be a separator, I suggest that the PEP give some examples. As is, I didn’t see any examples that showed ‘_’ as a separator.

It’s not a preferred separator, it’s use is mostly because of various normalization schemes, particularly Wheel, which will convert a ``-`` to a `` _`` in the version. Right now pip considers them equal because it was causing some breakage with Wheels. This rationale should probably be given in the PEP though.

The original bug report in pip for this was https://github.com/pypa/pip/issues/1150.

Related, I would suggest a consistent scheme for local version tags. Why not have local version tags have the same syntax as primary version numbers? That is, allow the same character set, pre and post versions, etc, just separated by a +. At the very least, I would expect local versions to allow underscores.

Originally local versions were just integers separated by dots. We wound up where we are so that downstream distributions can put more information inside of it. For instance Instead of Ubuntu taking a version like 1.0, and making it 1.0+1, they can do 1.0+ubuntu.1 or similar so that it’s obvious from the version number that this version is different than say Fedora, who might have also patched it and have 1.0+fedora.1.

I’m not sure what the use case is for pre/post/etc versions in the local version. At the point you’re doing more than simple patching you’re probably making a full fledged fork which should have it’s own name and version numbers I think?

These are all just nitpicks, though. A lot of work has gone into this spec, and it’s good to see the community coalescing on an implementable standard. It’s surely acceptable in the current form.

Donald Stufft
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA