Update pants versioning to use python's packaging.version

Review Request #4200 — Created Aug. 31, 2016 and submitted

molsen
pants
3382, 3827
pants-reviews
benjyw, gmalmquist, jsirois, kwlzn, stuhood, zundel

Change pants versioning to use python's packaging.version rather than semver. Python versioning doesn't
follow the semver spec. This change allows us to more closely follow the python spec. Specifically
python prefers versions of the form 1.2.0dev6 rather than 1.2.0-dev6. Semver does not allow for 1.2.0dev6.

This change is a follow up to changes to our naming conventions.

https://travis-ci.org/pantsbuild/pants/builds/156597437

Ran ./build-support/bin/release.sh -n with both '1.2.0-dev6' and '1.2.0dev6'

ST
  1. Ship It!
  2. 
      
JS
  1. 
      
  2. Hrm, Version does all this parsing but only exposes `is_prerelease` which combines pre|rc - not enough for our purposes. If you haven't checking with packaging folks about receptivity to to expanding the Version API to expose all the parsed parts that are part of the pep440 spec, I will.
    1. Great suggestion, this is a bit ugly to have in the code. I looked at is_prerelease as well and was a little frustrated I couldn't find a way to get packaging directly give me the information I needed. I cut a bug to packaging: https://github.com/pypa/packaging/issues/84

    2. Thanks!  I piled on on that issue.
  3. 
      
MO
Review request changed

Status: Closed (submitted)

Change Summary:

commit 69fcf06e54c7ead0b5851624823d1c7f66a56ce7

Loading...