From 43942b21d07f2705855bf286afc85b3f8b01d62f Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Thu, 21 Aug 2008 17:23:50 +0000 Subject: Backport doc changes from trunk --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4065935 --- pkg_resources.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkg_resources.py') diff --git a/pkg_resources.py b/pkg_resources.py index c5ebbb3d..9edb6c0b 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1862,7 +1862,7 @@ def parse_version(s): The algorithm assumes that strings like "-" and any alpha string that alphabetically follows "final" represents a "patch level". So, "2.4-1" is assumed to be a branch or patch of "2.4", and therefore "2.4.1" is - considered newer than "2.4-1", whic in turn is newer than "2.4". + considered newer than "2.4-1", which in turn is newer than "2.4". Strings like "a", "b", "c", "alpha", "beta", "candidate" and so on (that come before "final" alphabetically) are assumed to be pre-release versions, @@ -1871,7 +1871,8 @@ def parse_version(s): Finally, to handle miscellaneous cases, the strings "pre", "preview", and "rc" are treated as if they were "c", i.e. as though they were release candidates, and therefore are not as new as a version string that does not - contain them. + contain them, and "dev" is replaced with an '@' so that it sorts lower than + than any other pre-release tag. """ parts = [] for part in _parse_version_parts(s.lower()): -- cgit v1.2.3