aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pkg_resources.py2
-rwxr-xr-xpkg_resources.txt6
-rw-r--r--setuptools/tests/test_resources.py1
3 files changed, 7 insertions, 2 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index b4b92e87..ad28b79f 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -1747,7 +1747,7 @@ EGG_NAME = re.compile(
).match
component_re = re.compile(r'(\d+ | [a-z]+ | \.| -)', re.VERBOSE)
-replace = {'pre':'c', 'preview':'c','-':'final-','rc':'c'}.get
+replace = {'pre':'c', 'preview':'c','-':'final-','rc':'c','dev':'@'}.get
def _parse_version_parts(s):
for part in component_re.split(s):
diff --git a/pkg_resources.txt b/pkg_resources.txt
index fabdb46c..8e5e335e 100755
--- a/pkg_resources.txt
+++ b/pkg_resources.txt
@@ -1540,7 +1540,8 @@ Parsing Utilities
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 the string "dev" is treated as if it were an "@" sign;
+ that is, a version coming before even "a" or "alpha".
.. _yield_lines():
@@ -1691,6 +1692,9 @@ File/Path Utilities
Release Notes/Change History
----------------------------
+0.6c4
+ * Fix "dev" versions being considered newer than release candidates.
+
0.6c3
* Python 2.5 compatibility fixes.
diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py
index 6f3b1d78..a4b20de1 100644
--- a/setuptools/tests/test_resources.py
+++ b/setuptools/tests/test_resources.py
@@ -471,6 +471,7 @@ class ParseTests(TestCase):
c('0.0.4', '0.4.0')
c('0pl1', '0.4pl1')
c('2.1.0-rc1','2.1.0')
+ c('2.1dev','2.1a0')
torture ="""
0.80.1-3 0.80.1-2 0.80.1-1 0.79.9999+0.80.0pre4-1