[Checkins] SVN: z3c.checkversions/trunk/ prefer final versions
Christophe Combelles
ccomb at free.fr
Thu Jul 8 18:26:59 EDT 2010
Log message for revision 114354:
prefer final versions
Changed:
U z3c.checkversions/trunk/CHANGELOG.txt
U z3c.checkversions/trunk/z3c/checkversions/base.py
U z3c.checkversions/trunk/z3c/checkversions/installed.txt
U z3c.checkversions/trunk/z3c/checkversions/testindex/zope.component/index.html
U z3c.checkversions/trunk/z3c/checkversions/testindex2/zope.component/index.html
-=-
Modified: z3c.checkversions/trunk/CHANGELOG.txt
===================================================================
--- z3c.checkversions/trunk/CHANGELOG.txt 2010-07-08 18:47:34 UTC (rev 114353)
+++ z3c.checkversions/trunk/CHANGELOG.txt 2010-07-08 22:26:59 UTC (rev 114354)
@@ -5,6 +5,7 @@
----------------
- don't accumulate old comments
+- prefer final versions
0.2 (2010-05-22)
----------------
Modified: z3c.checkversions/trunk/z3c/checkversions/base.py
===================================================================
--- z3c.checkversions/trunk/z3c/checkversions/base.py 2010-07-08 18:47:34 UTC (rev 114353)
+++ z3c.checkversions/trunk/z3c/checkversions/base.py 2010-07-08 22:26:59 UTC (rev 114354)
@@ -15,6 +15,20 @@
from pkg_resources import parse_version, Requirement
from setuptools import package_index
+
+_final_parts = '*final-', '*final'
+def _final_version(parsed_version):
+ """Function copied from zc.buildout.easy_install._final_version
+
+ >>> 1+1
+ >>>
+ """
+ for part in parsed_version:
+ if (part[:1] == '*') and (part not in _final_parts):
+ return False
+ return True
+
+
class Checker(object):
"""Base class for version checkers
"""
@@ -53,9 +67,12 @@
req = Requirement.parse(name)
self.pi.find_packages(req)
new_dist = None
- # loop all versions until we find the first newer version
+ # loop all index versions until we find the 1st newer version
# that keeps the major versions (below level)
+ # and is a final version
for dist in self.pi[req.key]:
+ if not _final_version(dist.parsed_version):
+ continue
if dist.parsed_version[:level] > parsed_version[:level]:
continue
new_dist = dist
Modified: z3c.checkversions/trunk/z3c/checkversions/installed.txt
===================================================================
--- z3c.checkversions/trunk/z3c/checkversions/installed.txt 2010-07-08 18:47:34 UTC (rev 114353)
+++ z3c.checkversions/trunk/z3c/checkversions/installed.txt 2010-07-08 22:26:59 UTC (rev 114354)
@@ -6,7 +6,6 @@
We just check we can get the versions:
->>> from pprint import pprint
>>> versions = checker.get_versions()
# Checking your installed distributions
>>> 'z3c.checkversions' in versions
Modified: z3c.checkversions/trunk/z3c/checkversions/testindex/zope.component/index.html
===================================================================
--- z3c.checkversions/trunk/z3c/checkversions/testindex/zope.component/index.html 2010-07-08 18:47:34 UTC (rev 114353)
+++ z3c.checkversions/trunk/z3c/checkversions/testindex/zope.component/index.html 2010-07-08 22:26:59 UTC (rev 114354)
@@ -1,3 +1,4 @@
+<a href="http://pypi.python.org/packages/source/z/zope.component/zope.component-3.9.5dev.zip#md5=627744db8f318072416d49521d5b21c0)">zope.component</a>
<a href="http://pypi.python.org/packages/source/z/zope.component/zope.component-3.9.4.zip#md5=6277c4db8f318072416d49521d5b21c0)">zope.component</a>
<a href="http://pypi.python.org/packages/source/z/zope.component/zope.component-3.9.3.tar.gz#md5=f166a219dbc26b9e71490c7697f73d7e">zope.component</a>
<a href="http://pypi.python.org/packages/source/z/zope.component/zope.component-3.9.2.tar.gz#md5=7ae556f0f6228d36f1fff066e616dc69">zope.component</a>
Modified: z3c.checkversions/trunk/z3c/checkversions/testindex2/zope.component/index.html
===================================================================
--- z3c.checkversions/trunk/z3c/checkversions/testindex2/zope.component/index.html 2010-07-08 18:47:34 UTC (rev 114353)
+++ z3c.checkversions/trunk/z3c/checkversions/testindex2/zope.component/index.html 2010-07-08 22:26:59 UTC (rev 114354)
@@ -1,3 +1,4 @@
+<a href="http://pypi.python.org/packages/source/z/zope.component/zope.component-3.9.4dev.tar.gz#md5=f166a219dbc26b9e71490c7697f73d7e">zope.component</a>
<a href="http://pypi.python.org/packages/source/z/zope.component/zope.component-3.9.3.tar.gz#md5=f166a219dbc26b9e71490c7697f73d7e">zope.component</a>
<a href="http://pypi.python.org/packages/source/z/zope.component/zope.component-3.9.2.tar.gz#md5=7ae556f0f6228d36f1fff066e616dc69">zope.component</a>
<a href="http://pypi.python.org/packages/source/z/zope.component/zope.component-3.9.1.tar.gz#md5=1d59685c258b7a5db5151a9a485dd7b6">zope.component</a>
More information about the checkins
mailing list