aaronsw/html2text — Issue #29: Use sortable versioning scheme
Author: Arfrever
Created: 2011-11-10 00:36:07+00:00
State: open

Please use easily sortable versions (e.g. "3.1.0", "3.1.0.1", "3.1.1", "3.1.2"). Many tools treat "3.101" as newer than "3.11". (The master branch now has version "3.11 dev".)

```
$ python -c 'from distutils.version import LooseVersion; print(LooseVersion("3.101") > LooseVersion("3.11"))'
True
$ python -c 'from distutils.version import StrictVersion; print(StrictVersion("3.101") > StrictVersion("3.11"))'
True
```

Examples from a function used by Portage (main package manager for Gentoo Linux):

```
$ python -c 'from portage import vercmp; print(vercmp("1", "2"))'
-1
$ python -c 'from portage import vercmp; print(vercmp("1", "1"))'
0
$ python -c 'from portage import vercmp; print(vercmp("2", "1"))'
1
$ python -c 'from portage import vercmp; print(vercmp("3.101", "3.11"))'
1
```