pypa/pip — pull request #1894 by dstufft (2014-06-25 05:04:50+00:00)
Title: Proof of Concept: PEP 440 Version and Specifiers

So basically this uses a slightly modified copy of pypa/packaging#1 to implement PEP 440 in pip. This is mostly a proof of concept for right now however it "works" in that I can install stuff successfully with it. It implements all of the specifiers from PEP 440 including ``~=``, ``==X.*``, and ``===``. These likely cannot be used inside of an install_requires because setuptools does not support them however they can be used in a requirements.txt file and on the command line. Additionally they could also be used inside of a Wheel file. It *does* give the new semantics towards ``<`` and ``>`` as well as the semantics around local versions.

Some notes for those not up to date on the latest PEP 440 draft:

* All versions consider a "local" version (such as ``1.0+debian3``) to be semantically equivalent to whatever the public version is (``1.0`` in the example). So ``1.0+debian3`` is ``==1.0``.
* ``<``, and ``>`` work smarter with regards towards pre-releases, so ``<3`` does not match ``3.0.dev1``.
* Versions which are not PEP 440 compatible are excluded by default, however you can still depend on them by using the ``===`` operator which causes things to fall back to a simple case insensitive string comparison.

There is probably lots of bugs and corner cases and the like (hence proof of concept) but I think it's pretty cool!