Hello community, here is the log from the commit of package python-BTrees for openSUSE:Factory checked in at 2015-05-06 07:49:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-BTrees (Old) and /work/SRC/openSUSE:Factory/.python-BTrees.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-BTrees" Changes: -------- --- /work/SRC/openSUSE:Factory/python-BTrees/python-BTrees.changes 2015-02-06 22:38:30.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python-BTrees.new/python-BTrees.changes 2015-05-06 07:50:02.000000000 +0200 @@ -1,0 +2,8 @@ +Mon Apr 27 20:13:30 UTC 2015 - benoit.monin@gmx.fr + +- update to version 4.1.2: + * Suppress testing 64-bit values in OLBTrees on 32 bit machines. + * Fix _p_changed for small pure-Python BTrees. +- make the tests less verbose to avoid spamming the build log + +------------------------------------------------------------------- Old: ---- BTrees-4.1.1.tar.gz New: ---- BTrees-4.1.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-BTrees.spec ++++++ --- /var/tmp/diff_new_pack.ch4v6U/_old 2015-05-06 07:50:02.000000000 +0200 +++ /var/tmp/diff_new_pack.ch4v6U/_new 2015-05-06 07:50:02.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-BTrees # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2015 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ Name: python-BTrees -Version: 4.1.1 +Version: 4.1.2 Release: 0 Summary: Scalable persistent object containers License: ZPL-2.1 @@ -80,7 +80,7 @@ rm %{buildroot}%python_sitearch/BTrees/*.c %check -python setup.py test +python setup.py -q test %files %defattr(-,root,root) ++++++ BTrees-4.1.1.tar.gz -> BTrees-4.1.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/BTrees-4.1.1/.gitignore new/BTrees-4.1.2/.gitignore --- old/BTrees-4.1.1/.gitignore 2014-12-26 20:27:10.000000000 +0100 +++ new/BTrees-4.1.2/.gitignore 2015-04-07 17:49:35.000000000 +0200 @@ -16,3 +16,4 @@ *.egg dist .eggs/ +.dir-locals.el diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/BTrees-4.1.1/BTrees/_base.py new/BTrees-4.1.2/BTrees/_base.py --- old/BTrees-4.1.1/BTrees/_base.py 2014-12-26 20:24:08.000000000 +0100 +++ new/BTrees-4.1.2/BTrees/_base.py 2015-04-07 17:49:35.000000000 +0200 @@ -883,11 +883,16 @@ max_size = self.max_leaf_size if child.size > max_size: self._grow(child, index) - elif (grew is not None and - child.__class__ is self._bucket_type and - len(data) == 1 and - child._p_oid is None - ): + + # If a BTree contains only a single bucket, BTree.__getstate__() + # includes the bucket's entire state, and the bucket doesn't get + # an oid of its own. So if we have a single oid-less bucket that + # changed, it's *our* oid that should be marked as changed -- the + # bucket doesn't have one. + if (grew is not None and + child.__class__ is self._bucket_type and + len(data) == 1 and + child._p_oid is None): self._p_changed = 1 return result diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/BTrees-4.1.1/BTrees/tests/common.py new/BTrees-4.1.2/BTrees/tests/common.py --- old/BTrees-4.1.1/BTrees/tests/common.py 2014-12-27 21:12:17.000000000 +0100 +++ new/BTrees-4.1.2/BTrees/tests/common.py 2015-04-07 17:49:35.000000000 +0200 @@ -12,6 +12,9 @@ # ############################################################################## +import platform + + def _skip_wo_ZODB(test_method): #pragma NO COVER try: import ZODB @@ -32,6 +35,13 @@ else: return test_method +def _skip_on_32_bits(test_method): #pragma NO COVER + if platform.architecture()[0] == '32bit': + def _dummy(*args): + pass + return _dummy + return test_method + class Base(object): # Tests common to all types: sets, buckets, and BTrees @@ -758,7 +768,6 @@ # Too many arguments. self.assertRaises(TypeError, t.pop, 1, 2, 3) - class BTreeTests(MappingBase): # Tests common to all BTrees @@ -1081,6 +1090,56 @@ self.assertEqual(str(v), str(k[0])) self._checkIt(t) + def testAddTwoSetsChanged(self): + # A bug in the BTree Python implementation once + # caused adding a second item to a tree to fail + # to set _p_changed (adding the first item sets it because + # the _firstbucket gets set, but the second item only grew the + # existing bucket) + t = self._makeOne() + # Note that for the property to actually hold, we have to fake a + # _p_jar and _p_oid + t._p_oid = b'\0\0\0\0\0' + class Jar(object): + def __init__(self): + self._cache = self + self.registered = None + + def mru(self, arg): + pass + def readCurrent(self, arg): + pass + def register(self, arg): + self.registered = arg + + t._p_jar = Jar() + t[1] = 3 + # reset these, setting _firstbucket triggered a change + t._p_changed = False + t._p_jar.registered = None + t[2] = 4 + self.assertTrue(t._p_changed) + self.assertEqual(t, t._p_jar.registered) + + # Setting the same key to a different value also triggers a change + t._p_changed = False + t._p_jar.registered = None + t[2] = 5 + self.assertTrue(t._p_changed) + self.assertEqual(t, t._p_jar.registered) + + # Likewise with only a single value + t = self._makeOne() + t._p_oid = b'\0\0\0\0\0' + t._p_jar = Jar() + t[1] = 3 + # reset these, setting _firstbucket triggered a change + t._p_changed = False + t._p_jar.registered = None + + t[1] = 6 + self.assertTrue(t._p_changed) + self.assertEqual(t, t._p_jar.registered) class NormalSetTests(Base): # Test common to all set types diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/BTrees-4.1.1/BTrees/tests/test_OLBTree.py new/BTrees-4.1.2/BTrees/tests/test_OLBTree.py --- old/BTrees-4.1.1/BTrees/tests/test_OLBTree.py 2014-12-27 22:18:55.000000000 +0100 +++ new/BTrees-4.1.2/BTrees/tests/test_OLBTree.py 2015-04-07 17:44:44.000000000 +0200 @@ -27,6 +27,7 @@ from .common import Weighted from .common import itemsToSet from .common import makeBuilder +from .common import _skip_on_32_bits class OLBTreeInternalKeyTest(InternalKeysMappingTest, unittest.TestCase): @@ -108,6 +109,7 @@ def getTwoKeys(self): return "abc", "def" + @_skip_on_32_bits def test_extremes(self): from BTrees.tests.common import SMALLEST_64_BITS from BTrees.tests.common import SMALLEST_POSITIVE_65_BITS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/BTrees-4.1.1/BTrees.egg-info/PKG-INFO new/BTrees-4.1.2/BTrees.egg-info/PKG-INFO --- old/BTrees-4.1.1/BTrees.egg-info/PKG-INFO 2014-12-27 22:26:18.000000000 +0100 +++ new/BTrees-4.1.2/BTrees.egg-info/PKG-INFO 2015-04-07 17:53:06.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: BTrees -Version: 4.1.1 +Version: 4.1.2 Summary: Scalable persistent object containers Home-page: http://packages.python.org/BTrees Author: Zope Foundation @@ -21,6 +21,16 @@ ``BTrees`` Changelog ==================== + 4.1.2 (2015-04-07) + ------------------ + + - Suppress testing 64-bit values in OLBTrees on 32 bit machines. + See: https://github.com/zopefoundation/BTrees/issues/9 + + - Fix _p_changed for small pure-Python BTrees. + See https://github.com/zopefoundation/BTrees/issues/11 + + 4.1.1 (2014-12-27) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/BTrees-4.1.1/CHANGES.rst new/BTrees-4.1.2/CHANGES.rst --- old/BTrees-4.1.1/CHANGES.rst 2014-12-27 22:19:32.000000000 +0100 +++ new/BTrees-4.1.2/CHANGES.rst 2015-04-07 17:52:39.000000000 +0200 @@ -1,6 +1,16 @@ ``BTrees`` Changelog ==================== +4.1.2 (2015-04-07) +------------------ + +- Suppress testing 64-bit values in OLBTrees on 32 bit machines. + See: https://github.com/zopefoundation/BTrees/issues/9 + +- Fix _p_changed for small pure-Python BTrees. + See https://github.com/zopefoundation/BTrees/issues/11 + + 4.1.1 (2014-12-27) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/BTrees-4.1.1/PKG-INFO new/BTrees-4.1.2/PKG-INFO --- old/BTrees-4.1.1/PKG-INFO 2014-12-27 22:26:20.000000000 +0100 +++ new/BTrees-4.1.2/PKG-INFO 2015-04-07 17:53:08.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: BTrees -Version: 4.1.1 +Version: 4.1.2 Summary: Scalable persistent object containers Home-page: http://packages.python.org/BTrees Author: Zope Foundation @@ -21,6 +21,16 @@ ``BTrees`` Changelog ==================== + 4.1.2 (2015-04-07) + ------------------ + + - Suppress testing 64-bit values in OLBTrees on 32 bit machines. + See: https://github.com/zopefoundation/BTrees/issues/9 + + - Fix _p_changed for small pure-Python BTrees. + See https://github.com/zopefoundation/BTrees/issues/11 + + 4.1.1 (2014-12-27) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/BTrees-4.1.1/setup.py new/BTrees-4.1.2/setup.py --- old/BTrees-4.1.1/setup.py 2014-12-27 22:19:32.000000000 +0100 +++ new/BTrees-4.1.2/setup.py 2015-04-07 17:52:14.000000000 +0200 @@ -12,7 +12,7 @@ # ############################################################################## -__version__ = '4.1.1' +__version__ = '4.1.2' import os import platform