Hello community, here is the log from the commit of package python-Ming for openSUSE:Factory checked in at 2020-03-26 23:37:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Ming (Old) and /work/SRC/openSUSE:Factory/.python-Ming.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Ming" Thu Mar 26 23:37:49 2020 rev:11 rq:788606 version:0.9.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Ming/python-Ming.changes 2019-07-26 17:34:00.248094862 +0200 +++ /work/SRC/openSUSE:Factory/.python-Ming.new.3160/python-Ming.changes 2020-03-26 23:37:51.750874447 +0100 @@ -1,0 +2,6 @@ +Thu Mar 26 15:58:41 UTC 2020 - Marketa Calabkova <mcalabk...@suse.com> + +- update to 0.9.2 + * Support ODM before_save hook on Python 3 + +------------------------------------------------------------------- Old: ---- Ming-0.9.1.tar.gz New: ---- Ming-0.9.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Ming.spec ++++++ --- /var/tmp/diff_new_pack.BcBhG9/_old 2020-03-26 23:37:52.302874646 +0100 +++ /var/tmp/diff_new_pack.BcBhG9/_new 2020-03-26 23:37:52.302874646 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-Ming # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-Ming -Version: 0.9.1 +Version: 0.9.2 Release: 0 Summary: Bringing order to Mongo since 2009 License: MIT ++++++ Ming-0.9.1.tar.gz -> Ming-0.9.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Ming-0.9.1/Ming.egg-info/PKG-INFO new/Ming-0.9.2/Ming.egg-info/PKG-INFO --- old/Ming-0.9.1/Ming.egg-info/PKG-INFO 2019-05-15 14:36:53.000000000 +0200 +++ new/Ming-0.9.2/Ming.egg-info/PKG-INFO 2020-03-12 19:48:36.000000000 +0100 @@ -1,12 +1,11 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: Ming -Version: 0.9.1 +Version: 0.9.2 Summary: Bringing order to Mongo since 2009 Home-page: https://github.com/TurboGears/Ming Author: Rick Copeland Author-email: r...@geek.net License: MIT -Description-Content-Type: UNKNOWN Description: Database mapping layer for MongoDB on Python. Includes schema enforcement and some facilities for schema migration. Keywords: mongo,pymongo @@ -26,3 +25,4 @@ Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Provides-Extra: configure diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Ming-0.9.1/Ming.egg-info/SOURCES.txt new/Ming-0.9.2/Ming.egg-info/SOURCES.txt --- old/Ming-0.9.1/Ming.egg-info/SOURCES.txt 2019-05-15 14:36:53.000000000 +0200 +++ new/Ming-0.9.2/Ming.egg-info/SOURCES.txt 2020-03-12 19:48:36.000000000 +0100 @@ -5,12 +5,10 @@ Ming.egg-info/SOURCES.txt Ming.egg-info/dependency_links.txt Ming.egg-info/entry_points.txt -Ming.egg-info/pbr.json Ming.egg-info/requires.txt Ming.egg-info/top_level.txt Ming.egg-info/zip-safe ming/__init__.py -ming/allura.py ming/base.py ming/compat.py ming/config.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Ming-0.9.1/Ming.egg-info/pbr.json new/Ming-0.9.2/Ming.egg-info/pbr.json --- old/Ming-0.9.1/Ming.egg-info/pbr.json 2015-08-20 19:43:02.000000000 +0200 +++ new/Ming-0.9.2/Ming.egg-info/pbr.json 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -{"is_release": false, "git_version": "b0da88a"} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Ming-0.9.1/PKG-INFO new/Ming-0.9.2/PKG-INFO --- old/Ming-0.9.1/PKG-INFO 2019-05-15 14:36:53.000000000 +0200 +++ new/Ming-0.9.2/PKG-INFO 2020-03-12 19:48:37.000000000 +0100 @@ -1,12 +1,11 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: Ming -Version: 0.9.1 +Version: 0.9.2 Summary: Bringing order to Mongo since 2009 Home-page: https://github.com/TurboGears/Ming Author: Rick Copeland Author-email: r...@geek.net License: MIT -Description-Content-Type: UNKNOWN Description: Database mapping layer for MongoDB on Python. Includes schema enforcement and some facilities for schema migration. Keywords: mongo,pymongo @@ -26,3 +25,4 @@ Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Provides-Extra: configure diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Ming-0.9.1/ming/allura.py new/Ming-0.9.2/ming/allura.py --- old/Ming-0.9.1/ming/allura.py 2015-08-21 23:24:37.000000000 +0200 +++ new/Ming-0.9.2/ming/allura.py 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -count = 4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Ming-0.9.1/ming/odm/declarative.py new/Ming-0.9.2/ming/odm/declarative.py --- old/Ming-0.9.1/ming/odm/declarative.py 2015-11-03 21:11:46.000000000 +0100 +++ new/Ming-0.9.2/ming/odm/declarative.py 2020-03-12 19:44:06.000000000 +0100 @@ -80,7 +80,7 @@ migrate=getattr(mm, 'migrate', None) ) if hasattr(mm, 'before_save'): - collection_kwargs['before_save'] = mm.before_save.__func__ + collection_kwargs['before_save'] = getattr(mm.before_save, '__func__', mm.before_save) if not doc_bases: collection_cls = collection( mm.name, mm.session and mm.session.impl, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Ming-0.9.1/ming/tests/odm/test_declarative.py new/Ming-0.9.2/ming/tests/odm/test_declarative.py --- old/Ming-0.9.1/ming/tests/odm/test_declarative.py 2015-08-22 00:54:01.000000000 +0200 +++ new/Ming-0.9.2/ming/tests/odm/test_declarative.py 2020-03-12 19:44:06.000000000 +0100 @@ -1,3 +1,4 @@ +from collections import defaultdict from unittest import TestCase from ming import schema as S @@ -666,3 +667,32 @@ cursor = ODMCursor(session, cls, mongo_cursor) self.assertRaises(MingException, lambda: bool(cursor)) + +class TestHooks(TestCase): + + def setUp(self): + self.datastore = create_datastore('mim:///test_db') + self.session = ODMSession(bind=self.datastore) + self.hooks_called = defaultdict(list) + tc = self + class Basic(MappedClass): + class __mongometa__: + name = 'hook' + session = self.session + def before_save(instance): + tc.hooks_called['before_save'].append(instance) + + _id = FieldProperty(S.ObjectId) + a = FieldProperty(int) + Mapper.compile_all() + self.Basic = Basic + self.session.remove(self.Basic) + + def test_hook_base(self): + doc = self.Basic() + doc.a = 5 + self.session.flush() + self.assertEqual(self.hooks_called['before_save'], + [ + {'_id': doc._id, 'a': doc.a} + ]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Ming-0.9.1/ming/version.py new/Ming-0.9.2/ming/version.py --- old/Ming-0.9.1/ming/version.py 2019-05-15 14:35:30.000000000 +0200 +++ new/Ming-0.9.2/ming/version.py 2020-03-12 19:48:08.000000000 +0100 @@ -1,2 +1,2 @@ -__version_info__ = ('0', '9', '1') +__version_info__ = ('0', '9', '2') __version__ = '.'.join(__version_info__)