Hello community, here is the log from the commit of package python-odict for openSUSE:Factory checked in at 2013-09-09 19:50:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-odict (Old) and /work/SRC/openSUSE:Factory/.python-odict.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-odict" Changes: -------- --- /work/SRC/openSUSE:Factory/python-odict/python-odict.changes 2012-06-13 22:46:20.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-odict.new/python-odict.changes 2013-09-09 19:50:33.000000000 +0200 @@ -1,0 +2,7 @@ +Sun Sep 8 20:05:00 UTC 2013 - os-...@jacraig.com + +- Update to 1.5.1: + * Implement __copy__ and __deepcopy__ in order to work with Python 2.7. + * Use try/except instead of in in __contains__. + +------------------------------------------------------------------- Old: ---- odict-1.5.0.tar.gz New: ---- odict-1.5.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-odict.spec ++++++ --- /var/tmp/diff_new_pack.JkWCei/_old 2013-09-09 19:50:34.000000000 +0200 +++ /var/tmp/diff_new_pack.JkWCei/_new 2013-09-09 19:50:34.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-odict # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: python-odict -Version: 1.5.0 +Version: 1.5.1 Release: 0 Url: https://github.com/bluedynamics/odict Summary: Ordered dictionary ++++++ odict-1.5.0.tar.gz -> odict-1.5.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/odict-1.5.0/PKG-INFO new/odict-1.5.1/PKG-INFO --- old/odict-1.5.0/PKG-INFO 2012-05-23 09:36:49.000000000 +0200 +++ new/odict-1.5.1/PKG-INFO 2012-10-17 17:43:54.000000000 +0200 @@ -1,6 +1,6 @@ -Metadata-Version: 1.0 +Metadata-Version: 1.1 Name: odict -Version: 1.5.0 +Version: 1.5.1 Summary: Ordered dictionary. Home-page: https://github.com/bluedynamics/odict Author: BlueDynamics Alliance @@ -23,6 +23,7 @@ can be simplified (and speed up) a lot if given a value you can at the same time find its key. With that, you can use normal C pointers. + Memory used (Python 2.5) ------------------------ @@ -32,6 +33,7 @@ - odict(int:None): 102 bytes/element + Performance ----------- @@ -80,7 +82,6 @@ Relation ``dict:odict`` of creating and deleting. - +--------------------------+----------+ | creating 1000 objects | 1:14.823 | +--------------------------+----------+ @@ -99,6 +100,7 @@ | deleting 1000000 objects | 1:5.3781 | +--------------------------+----------+ + Usage ----- @@ -146,62 +148,82 @@ Changes ======= + + Version 1.5.1 + ------------- + + - Implement ``__copy__`` and ``__deepcopy__`` in order to work with Python 2.7. + [rnix, 2012-10-15] + + - Use ``try/except`` instead of ``in`` in ``__contains__``. + [rnix, 2012-10-15] + + Version 1.5.0 ------------- - Implement ``alter_key``. [rnix, 2012-05-18] + Version 1.4.4 ------------- - - remove unused error variable + - Remove unused error variable. [rnix, 2011-11-28] - - add note on why to check with ``==`` and ``!=`` against ``_nil`` + - Add note on why to check with ``==`` and ``!=`` against ``_nil``. [rnix, 2011-11-28] + Version 1.4.3 ------------- - - get rid of annoying warning about "global" usage in bench.py + - Get rid of annoying warning about "global" usage in ``bench.py``. [jensens, 2011-09-20] + Version 1.4.2 ------------- - - More ``copy`` testing + - More ``copy`` testing. + [rnix, 2010-12-18] + + - Add ``has_key`` to odict. + [rnix, 2010-12-18] - - Add ``has_key`` to odict - rnix, 2010-12-18 Version 1.4.1 ------------- - - Fix release, README.rst was missing, added MANIFEST.in file to include it - jensens, 2010-11-29 + - Fix release, README.rst was missing, added MANIFEST.in file to include it. + [jensens, 2010-11-29] + Version 1.4.0 ------------- - - Full test coverage - chaoflow, rnix, 2010-08-17 + - Full test coverage. + [chaoflow, rnix, 2010-08-17] + + - Code cleanup and optimizing. + [chaoflow, rnix, 2010-08-17] - - Code cleanup and optimizing - chaoflow, rnix, 2010-08-17 Version 1.3.2 ------------- - Access ``dict`` API providing class via function ``_dict_impl()`` and provide odict logic as abstract base class ``_odict``. - rnix, 2010-07-08 + [rnix, 2010-07-08] + Version 1.3.1 ------------- - - Add test for bool evaluation - rnix, 2010-04-21 + - Add test for bool evaluation. + [rnix, 2010-04-21] + Version 1.3.0 ------------- @@ -209,77 +231,86 @@ - Fix access to ``odict.lt`` and ``odict.lh`` properties. Now it's possible to overwrite ``__setattr__`` and ``__getattr__`` on ``odict`` subclass without hassle. - rnix, 2010-04-06 + [rnix, 2010-04-06] - Add ``sort`` function to odict. - rnix, 2010-03-03 + [rnix, 2010-03-03] + Version 1.2.6 ------------- - - Make ``odict`` serialize and deserialize properly - gogo, 2010-01-12 + - Make ``odict`` serialize and deserialize properly. + [gogo, 2010-01-12] + Version 1.2.5 ------------- - Add ``as_dict`` function. Supports type conversion to ordinary ``dict``. - rnix, 2009-12-19 + [rnix, 2009-12-19] + + - Add benchmark script. + [rnix, 2009-12-19] - - Add benchmark script - rnix, 2009-12-19 Version 1.2.4 ------------- - Do not check for ``key in self`` on ``__delitem__``, ``KeyError`` is raised properly anyway. Huge Speedup! - rnix, jensens, 2009-12-18 + [rnix, jensens, 2009-12-18] + Version 1.2.3 ------------- - Move tests to seperate file and make egg testable with ``python setup.py test``. - rnix, 2009-12-07 + [rnix, 2009-12-07] - improve ``lt`` and ``lh`` properties to make ``odict`` work with ``copy.deepcopy``. - rnix, 2009-12-07 + [rnix, 2009-12-07] + Version 1.2.2 ------------- - Use try/except instead of ``__iter__`` in ``__setitem__`` to determine if value was already set. - rnix, 2009-07-17 + [rnix, 2009-07-17] + Version 1.2.1 ------------- - Add missing ``__len__`` and ``__contains__`` functions. - rnix, 2009-03-17 - + [rnix, 2009-03-17] + + Version 1.2.0 ------------- - - eggified - rnix, 2009-03-17 + - Eggified + [rnix, 2009-03-17] + Version < 1.2 ------------- - http://code.activestate.com/recipes/498195/ - bearophile, 2006-10-12 - + [bearophile, 2006-10-12] + + Contributors ============ - + - bearophile - Robert Niederreiter <rnix [at] squarewave [dot] at> - - Georg Bernhard <g [dot] bernhard@akbild [dot] ac [dot] at> + - Georg Bernhard <g [dot] bernhard [at] akbild [dot] ac [dot] at> - Florian Friesdorf <flo [at] chaoflow [dot] net> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/odict-1.5.0/README.rst new/odict-1.5.1/README.rst --- old/odict-1.5.0/README.rst 2012-05-23 09:35:54.000000000 +0200 +++ new/odict-1.5.1/README.rst 2012-10-17 17:41:57.000000000 +0200 @@ -15,6 +15,7 @@ can be simplified (and speed up) a lot if given a value you can at the same time find its key. With that, you can use normal C pointers. + Memory used (Python 2.5) ------------------------ @@ -24,6 +25,7 @@ - odict(int:None): 102 bytes/element + Performance ----------- @@ -72,7 +74,6 @@ Relation ``dict:odict`` of creating and deleting. - +--------------------------+----------+ | creating 1000 objects | 1:14.823 | +--------------------------+----------+ @@ -91,6 +92,7 @@ | deleting 1000000 objects | 1:5.3781 | +--------------------------+----------+ + Usage ----- @@ -138,62 +140,82 @@ Changes ======= + +Version 1.5.1 +------------- + +- Implement ``__copy__`` and ``__deepcopy__`` in order to work with Python 2.7. + [rnix, 2012-10-15] + +- Use ``try/except`` instead of ``in`` in ``__contains__``. + [rnix, 2012-10-15] + + Version 1.5.0 ------------- - Implement ``alter_key``. [rnix, 2012-05-18] + Version 1.4.4 ------------- -- remove unused error variable +- Remove unused error variable. [rnix, 2011-11-28] -- add note on why to check with ``==`` and ``!=`` against ``_nil`` +- Add note on why to check with ``==`` and ``!=`` against ``_nil``. [rnix, 2011-11-28] + Version 1.4.3 ------------- -- get rid of annoying warning about "global" usage in bench.py +- Get rid of annoying warning about "global" usage in ``bench.py``. [jensens, 2011-09-20] + Version 1.4.2 ------------- -- More ``copy`` testing +- More ``copy`` testing. + [rnix, 2010-12-18] + +- Add ``has_key`` to odict. + [rnix, 2010-12-18] -- Add ``has_key`` to odict - rnix, 2010-12-18 Version 1.4.1 ------------- -- Fix release, README.rst was missing, added MANIFEST.in file to include it - jensens, 2010-11-29 +- Fix release, README.rst was missing, added MANIFEST.in file to include it. + [jensens, 2010-11-29] + Version 1.4.0 ------------- -- Full test coverage - chaoflow, rnix, 2010-08-17 +- Full test coverage. + [chaoflow, rnix, 2010-08-17] + +- Code cleanup and optimizing. + [chaoflow, rnix, 2010-08-17] -- Code cleanup and optimizing - chaoflow, rnix, 2010-08-17 Version 1.3.2 ------------- - Access ``dict`` API providing class via function ``_dict_impl()`` and provide odict logic as abstract base class ``_odict``. - rnix, 2010-07-08 + [rnix, 2010-07-08] + Version 1.3.1 ------------- -- Add test for bool evaluation - rnix, 2010-04-21 +- Add test for bool evaluation. + [rnix, 2010-04-21] + Version 1.3.0 ------------- @@ -201,77 +223,86 @@ - Fix access to ``odict.lt`` and ``odict.lh`` properties. Now it's possible to overwrite ``__setattr__`` and ``__getattr__`` on ``odict`` subclass without hassle. - rnix, 2010-04-06 + [rnix, 2010-04-06] - Add ``sort`` function to odict. - rnix, 2010-03-03 + [rnix, 2010-03-03] + Version 1.2.6 ------------- -- Make ``odict`` serialize and deserialize properly - gogo, 2010-01-12 +- Make ``odict`` serialize and deserialize properly. + [gogo, 2010-01-12] + Version 1.2.5 ------------- - Add ``as_dict`` function. Supports type conversion to ordinary ``dict``. - rnix, 2009-12-19 + [rnix, 2009-12-19] + +- Add benchmark script. + [rnix, 2009-12-19] -- Add benchmark script - rnix, 2009-12-19 Version 1.2.4 ------------- - Do not check for ``key in self`` on ``__delitem__``, ``KeyError`` is raised properly anyway. Huge Speedup! - rnix, jensens, 2009-12-18 + [rnix, jensens, 2009-12-18] + Version 1.2.3 ------------- - Move tests to seperate file and make egg testable with ``python setup.py test``. - rnix, 2009-12-07 + [rnix, 2009-12-07] - improve ``lt`` and ``lh`` properties to make ``odict`` work with ``copy.deepcopy``. - rnix, 2009-12-07 + [rnix, 2009-12-07] + Version 1.2.2 ------------- - Use try/except instead of ``__iter__`` in ``__setitem__`` to determine if value was already set. - rnix, 2009-07-17 + [rnix, 2009-07-17] + Version 1.2.1 ------------- - Add missing ``__len__`` and ``__contains__`` functions. - rnix, 2009-03-17 - + [rnix, 2009-03-17] + + Version 1.2.0 ------------- -- eggified - rnix, 2009-03-17 +- Eggified + [rnix, 2009-03-17] + Version < 1.2 ------------- - http://code.activestate.com/recipes/498195/ - bearophile, 2006-10-12 - + [bearophile, 2006-10-12] + + Contributors ============ - + - bearophile - Robert Niederreiter <rnix [at] squarewave [dot] at> -- Georg Bernhard <g [dot] bernhard@akbild [dot] ac [dot] at> +- Georg Bernhard <g [dot] bernhard [at] akbild [dot] ac [dot] at> - Florian Friesdorf <flo [at] chaoflow [dot] net> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/odict-1.5.0/setup.py new/odict-1.5.1/setup.py --- old/odict-1.5.0/setup.py 2012-05-23 09:35:03.000000000 +0200 +++ new/odict-1.5.1/setup.py 2012-10-17 17:41:37.000000000 +0200 @@ -3,7 +3,7 @@ from setuptools import setup, find_packages import os -version = '1.5.0' +version = '1.5.1' shortdesc = 'Ordered dictionary.' longdesc = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() longdesc += open(os.path.join(os.path.dirname(__file__), 'LICENSE.rst')).read() @@ -26,14 +26,14 @@ url=u'https://github.com/bluedynamics/odict', license='Python Software Foundation License', packages=find_packages('src'), - package_dir = {'': 'src'}, + package_dir={'': 'src'}, namespace_packages=[], include_package_data=True, zip_safe=True, install_requires=['setuptools'], tests_require=tests_require, test_suite="odict.tests.test_suite", - extras_require = dict( + extras_require=dict( test=tests_require, ), ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/odict-1.5.0/src/odict/pyodict.py new/odict-1.5.1/src/odict/pyodict.py --- old/odict-1.5.0/src/odict/pyodict.py 2012-05-18 20:51:34.000000000 +0200 +++ new/odict-1.5.1/src/odict/pyodict.py 2012-10-16 16:22:54.000000000 +0200 @@ -1,9 +1,11 @@ # Python Software Foundation License +import copy + class _Nil(object): - """Q: it feels like using the class with "is" and "is not" instead of + """Q: it feels like using the class with "is" and "is not" instead of "==" and "!=" should be faster. - + A: This would break implementations which use pickle for persisting. """ @@ -96,7 +98,7 @@ def __delitem__(self, key): dict_impl = self._dict_impl() - pred, _ ,succ= self._dict_impl().__getitem__(self, key) + pred, _, succ = self._dict_impl().__getitem__(self, key) if pred == _nil: dict_impl.__setattr__(self, 'lh', succ) else: @@ -107,9 +109,28 @@ dict_impl.__getitem__(self, succ)[0] = pred dict_impl.__delitem__(self, key) + def __copy__(self): + new = type(self)() + for k, v in self.iteritems(): + new[k] = v + new.__dict__.update(self.__dict__) + return new + + def __deepcopy__(self, memo): + new = type(self)() + memo[id(self)] = new + for k, v in self.iteritems(): + new[k] = copy.deepcopy(v, memo) + for k, v in self.__dict__.iteritems(): + setattr(new, k, copy.deepcopy(v, memo)) + return new + def __contains__(self, key): - # XXX: try: self[key] ... - return key in self.keys() + try: + self[key] + return True + except KeyError: + return False def has_key(self, key): return key in self @@ -145,7 +166,7 @@ def keys(self): return list(self.iterkeys()) - + def alter_key(self, old_key, new_key): dict_impl = self._dict_impl() val = dict_impl.__getitem__(self, old_key) @@ -184,7 +205,7 @@ return list(self.iteritems()) def sort(self, cmp=None, key=None, reverse=False): - items = [(k, v) for k,v in self.items()] + items = [(k, v) for k, v in self.items()] if cmp is not None: items = sorted(items, cmp=cmp) elif key is not None: @@ -309,6 +330,7 @@ dict_impl.__getattribute__(self, 'lt'), dict_impl.__repr__(self)) + class odict(_odict, dict): def _dict_impl(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/odict-1.5.0/src/odict/tests.py new/odict-1.5.1/src/odict/tests.py --- old/odict-1.5.0/src/odict/tests.py 2011-11-08 17:03:54.000000000 +0100 +++ new/odict-1.5.1/src/odict/tests.py 2012-10-16 16:22:54.000000000 +0200 @@ -13,14 +13,15 @@ 'pyodict.rst', ] + def test_suite(): return unittest.TestSuite([ doctest.DocFileSuite( - file, + test_file, optionflags=optionflags, globs={'interact': interact, 'pprint': pprint}, - ) for file in TESTFILES + ) for test_file in TESTFILES ]) if __name__ == '__main__': diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/odict-1.5.0/src/odict.egg-info/PKG-INFO new/odict-1.5.1/src/odict.egg-info/PKG-INFO --- old/odict-1.5.0/src/odict.egg-info/PKG-INFO 2012-05-23 09:36:49.000000000 +0200 +++ new/odict-1.5.1/src/odict.egg-info/PKG-INFO 2012-10-17 17:43:54.000000000 +0200 @@ -1,6 +1,6 @@ -Metadata-Version: 1.0 +Metadata-Version: 1.1 Name: odict -Version: 1.5.0 +Version: 1.5.1 Summary: Ordered dictionary. Home-page: https://github.com/bluedynamics/odict Author: BlueDynamics Alliance @@ -23,6 +23,7 @@ can be simplified (and speed up) a lot if given a value you can at the same time find its key. With that, you can use normal C pointers. + Memory used (Python 2.5) ------------------------ @@ -32,6 +33,7 @@ - odict(int:None): 102 bytes/element + Performance ----------- @@ -80,7 +82,6 @@ Relation ``dict:odict`` of creating and deleting. - +--------------------------+----------+ | creating 1000 objects | 1:14.823 | +--------------------------+----------+ @@ -99,6 +100,7 @@ | deleting 1000000 objects | 1:5.3781 | +--------------------------+----------+ + Usage ----- @@ -146,62 +148,82 @@ Changes ======= + + Version 1.5.1 + ------------- + + - Implement ``__copy__`` and ``__deepcopy__`` in order to work with Python 2.7. + [rnix, 2012-10-15] + + - Use ``try/except`` instead of ``in`` in ``__contains__``. + [rnix, 2012-10-15] + + Version 1.5.0 ------------- - Implement ``alter_key``. [rnix, 2012-05-18] + Version 1.4.4 ------------- - - remove unused error variable + - Remove unused error variable. [rnix, 2011-11-28] - - add note on why to check with ``==`` and ``!=`` against ``_nil`` + - Add note on why to check with ``==`` and ``!=`` against ``_nil``. [rnix, 2011-11-28] + Version 1.4.3 ------------- - - get rid of annoying warning about "global" usage in bench.py + - Get rid of annoying warning about "global" usage in ``bench.py``. [jensens, 2011-09-20] + Version 1.4.2 ------------- - - More ``copy`` testing + - More ``copy`` testing. + [rnix, 2010-12-18] + + - Add ``has_key`` to odict. + [rnix, 2010-12-18] - - Add ``has_key`` to odict - rnix, 2010-12-18 Version 1.4.1 ------------- - - Fix release, README.rst was missing, added MANIFEST.in file to include it - jensens, 2010-11-29 + - Fix release, README.rst was missing, added MANIFEST.in file to include it. + [jensens, 2010-11-29] + Version 1.4.0 ------------- - - Full test coverage - chaoflow, rnix, 2010-08-17 + - Full test coverage. + [chaoflow, rnix, 2010-08-17] + + - Code cleanup and optimizing. + [chaoflow, rnix, 2010-08-17] - - Code cleanup and optimizing - chaoflow, rnix, 2010-08-17 Version 1.3.2 ------------- - Access ``dict`` API providing class via function ``_dict_impl()`` and provide odict logic as abstract base class ``_odict``. - rnix, 2010-07-08 + [rnix, 2010-07-08] + Version 1.3.1 ------------- - - Add test for bool evaluation - rnix, 2010-04-21 + - Add test for bool evaluation. + [rnix, 2010-04-21] + Version 1.3.0 ------------- @@ -209,77 +231,86 @@ - Fix access to ``odict.lt`` and ``odict.lh`` properties. Now it's possible to overwrite ``__setattr__`` and ``__getattr__`` on ``odict`` subclass without hassle. - rnix, 2010-04-06 + [rnix, 2010-04-06] - Add ``sort`` function to odict. - rnix, 2010-03-03 + [rnix, 2010-03-03] + Version 1.2.6 ------------- - - Make ``odict`` serialize and deserialize properly - gogo, 2010-01-12 + - Make ``odict`` serialize and deserialize properly. + [gogo, 2010-01-12] + Version 1.2.5 ------------- - Add ``as_dict`` function. Supports type conversion to ordinary ``dict``. - rnix, 2009-12-19 + [rnix, 2009-12-19] + + - Add benchmark script. + [rnix, 2009-12-19] - - Add benchmark script - rnix, 2009-12-19 Version 1.2.4 ------------- - Do not check for ``key in self`` on ``__delitem__``, ``KeyError`` is raised properly anyway. Huge Speedup! - rnix, jensens, 2009-12-18 + [rnix, jensens, 2009-12-18] + Version 1.2.3 ------------- - Move tests to seperate file and make egg testable with ``python setup.py test``. - rnix, 2009-12-07 + [rnix, 2009-12-07] - improve ``lt`` and ``lh`` properties to make ``odict`` work with ``copy.deepcopy``. - rnix, 2009-12-07 + [rnix, 2009-12-07] + Version 1.2.2 ------------- - Use try/except instead of ``__iter__`` in ``__setitem__`` to determine if value was already set. - rnix, 2009-07-17 + [rnix, 2009-07-17] + Version 1.2.1 ------------- - Add missing ``__len__`` and ``__contains__`` functions. - rnix, 2009-03-17 - + [rnix, 2009-03-17] + + Version 1.2.0 ------------- - - eggified - rnix, 2009-03-17 + - Eggified + [rnix, 2009-03-17] + Version < 1.2 ------------- - http://code.activestate.com/recipes/498195/ - bearophile, 2006-10-12 - + [bearophile, 2006-10-12] + + Contributors ============ - + - bearophile - Robert Niederreiter <rnix [at] squarewave [dot] at> - - Georg Bernhard <g [dot] bernhard@akbild [dot] ac [dot] at> + - Georg Bernhard <g [dot] bernhard [at] akbild [dot] ac [dot] at> - Florian Friesdorf <flo [at] chaoflow [dot] net> -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org