[Checkins] SVN: z3c.checkversions/trunk/ Fix IndexError when buildout.cfg had a package with a blank version pin.

Marius Gedminas cvs-admin at zope.org
Mon Jun 11 09:10:44 UTC 2012


Log message for revision 126710:
  Fix IndexError when buildout.cfg had a package with a blank version pin.

Changed:
  U   z3c.checkversions/trunk/CHANGELOG.txt
  U   z3c.checkversions/trunk/z3c/checkversions/base.py
  U   z3c.checkversions/trunk/z3c/checkversions/buildout.txt

-=-
Modified: z3c.checkversions/trunk/CHANGELOG.txt
===================================================================
--- z3c.checkversions/trunk/CHANGELOG.txt	2012-06-11 09:10:36 UTC (rev 126709)
+++ z3c.checkversions/trunk/CHANGELOG.txt	2012-06-11 09:10:41 UTC (rev 126710)
@@ -8,6 +8,8 @@
   in buildout.
 - ignore installed packages while searching for new versions, only look in
   the package index (makes the test suite more reliable, among other things).
+- fix IndexError: list index out of range when buildout.cfg had a package with
+  a blank version pin.
 
 0.4.1 (2010-08-25)
 ------------------

Modified: z3c.checkversions/trunk/z3c/checkversions/base.py
===================================================================
--- z3c.checkversions/trunk/z3c/checkversions/base.py	2012-06-11 09:10:36 UTC (rev 126709)
+++ z3c.checkversions/trunk/z3c/checkversions/base.py	2012-06-11 09:10:41 UTC (rev 126710)
@@ -118,10 +118,10 @@
                 if self.incremental == True:
                     self.incremental = 'stop'
                 if self.verbose:
-                    print("# was: %s" % version.split()[0])
+                    print("# was: %s" % version)
                 print("%s=%s" % (name, new_dist.version))
             elif self.verbose:
-                print("%s=%s" % (name, version.split()[0]))
+                print("%s=%s" % (name, version))
 
 
     def get_versions(self):

Modified: z3c.checkversions/trunk/z3c/checkversions/buildout.txt
===================================================================
--- z3c.checkversions/trunk/z3c/checkversions/buildout.txt	2012-06-11 09:10:36 UTC (rev 126709)
+++ z3c.checkversions/trunk/z3c/checkversions/buildout.txt	2012-06-11 09:10:41 UTC (rev 126710)
@@ -133,3 +133,27 @@
 >>> p.stdout.read().lower().startswith('usage: ')
 True
 
+
+explicitly unpinned versions
+----------------------------
+
+it's possible to explicitly say you don't want a particular package to be
+pinned.
+
+>>> buildout_path = write_temp_file("""
+... [buildout]
+... index = %s
+... versions = versions
+... [versions]
+... distribute =
+... zope.component = 3.0.0
+... """ % testindex)
+
+>>> checker = buildout.Checker(filename=buildout_path, verbose=True)
+>>> checker.check()
+# Checking buildout file ...
+distribute=
+# was: 3.0.0
+zope.component=3.9.4
+
+>>> os.remove(buildout_path)



More information about the checkins mailing list