Hello community,

here is the log from the commit of package python3-transaction for 
openSUSE:Factory checked in at 2016-06-25 02:20:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-transaction (Old)
 and      /work/SRC/openSUSE:Factory/.python3-transaction.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python3-transaction"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-transaction/python3-transaction.changes  
2016-05-25 21:29:04.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.python3-transaction.new/python3-transaction.changes 
    2016-06-25 02:21:46.000000000 +0200
@@ -1,0 +2,8 @@
+Sun Jun 19 15:04:58 UTC 2016 - a...@gmx.de
+
+- update to version 1.6.1:
+  * Fixed: Synchonizers that registered with transaction managers when
+    transactions were in progress didn’t have their newTransaction
+    methods called to let them know of the in-progress transactions.
+
+-------------------------------------------------------------------

Old:
----
  transaction-1.6.0.tar.gz

New:
----
  transaction-1.6.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python3-transaction.spec ++++++
--- /var/tmp/diff_new_pack.m9qEM1/_old  2016-06-25 02:21:47.000000000 +0200
+++ /var/tmp/diff_new_pack.m9qEM1/_new  2016-06-25 02:21:47.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           python3-transaction
-Version:        1.6.0
+Version:        1.6.1
 Release:        0
 Summary:        Transaction management for Python
 License:        ZPL-2.1

++++++ transaction-1.6.0.tar.gz -> transaction-1.6.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/transaction-1.6.0/.coveragerc 
new/transaction-1.6.1/.coveragerc
--- old/transaction-1.6.0/.coveragerc   2015-01-13 17:49:42.000000000 +0100
+++ new/transaction-1.6.1/.coveragerc   2016-06-10 23:45:55.000000000 +0200
@@ -2,3 +2,4 @@
 exclude_lines =
     # pragma: no cover
     class I[A-Z]\w+\((Interface|I[A-Z].*)\):
+show_missing = true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/transaction-1.6.0/CHANGES.rst 
new/transaction-1.6.1/CHANGES.rst
--- old/transaction-1.6.0/CHANGES.rst   2016-05-21 22:27:03.000000000 +0200
+++ new/transaction-1.6.1/CHANGES.rst   2016-06-10 23:46:20.000000000 +0200
@@ -1,6 +1,13 @@
 Changes
 =======
 
+1.6.1 (2016-06-10)
+------------------
+
+- Fixed: Synchonizers that registered with transaction managers when
+  transactions were in progress didn't have their newTransaction
+  methods called to let them know of the in-progress transactions.
+
 1.6.0 (2016-05-21)
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/transaction-1.6.0/PKG-INFO 
new/transaction-1.6.1/PKG-INFO
--- old/transaction-1.6.0/PKG-INFO      2016-05-21 22:28:39.000000000 +0200
+++ new/transaction-1.6.1/PKG-INFO      2016-06-10 23:47:24.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: transaction
-Version: 1.6.0
+Version: 1.6.1
 Summary: Transaction management for Python
 Home-page: http://www.zope.org/Products/ZODB
 Author: Zope Corporation
@@ -36,6 +36,13 @@
         Changes
         =======
         
+        1.6.1 (2016-06-10)
+        ------------------
+        
+        - Fixed: Synchonizers that registered with transaction managers when
+          transactions were in progress didn't have their newTransaction
+          methods called to let them know of the in-progress transactions.
+        
         1.6.0 (2016-05-21)
         ------------------
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/transaction-1.6.0/buildout.cfg 
new/transaction-1.6.1/buildout.cfg
--- old/transaction-1.6.0/buildout.cfg  2013-09-09 23:05:20.000000000 +0200
+++ new/transaction-1.6.1/buildout.cfg  2016-06-10 23:45:55.000000000 +0200
@@ -1,7 +1,12 @@
 [buildout]
 develop = .
-parts = test
+parts = py
 
 [test]
 recipe = zc.recipe.testrunner
-eggs = transaction
+eggs = transaction [test]
+
+[py]
+recipe = zc.recipe.egg
+eggs = ${test:eggs}
+interpreter = py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/transaction-1.6.0/setup.py 
new/transaction-1.6.1/setup.py
--- old/transaction-1.6.0/setup.py      2016-05-21 22:27:46.000000000 +0200
+++ new/transaction-1.6.1/setup.py      2016-06-10 23:46:34.000000000 +0200
@@ -11,14 +11,13 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-version = '1.6.0'
+version = '1.6.1'
 
 import os
 from setuptools import setup, find_packages
 
 here = os.path.abspath(os.path.dirname(__file__))
 
-
 def _read_file(filename):
     with open(os.path.join(here, filename)) as f:
         return f.read()
@@ -26,6 +25,8 @@
 
 README = _read_file('README.rst') + '\n\n' + _read_file('CHANGES.rst')
 
+tests_require = ['mock']
+
 setup(name='transaction',
       version=version,
       description='Transaction management for Python',
@@ -58,15 +59,14 @@
       include_package_data=True,
       zip_safe=False,
       test_suite="transaction.tests",
-      tests_require = [
-        'zope.interface',
-        ],
+      tests_require = tests_require,
       install_requires=[
         'zope.interface',
         ],
       extras_require = {
         'docs': ['Sphinx', 'repoze.sphinx.autointerface'],
-        'testing': ['nose', 'coverage'],
+        'test': tests_require,
+        'testing': ['nose', 'coverage'] + tests_require,
       },
       entry_points = """\
       """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/transaction-1.6.0/tox.ini 
new/transaction-1.6.1/tox.ini
--- old/transaction-1.6.0/tox.ini       2016-04-28 20:29:54.000000000 +0200
+++ new/transaction-1.6.1/tox.ini       2016-06-10 23:45:55.000000000 +0200
@@ -17,6 +17,7 @@
     nose
     coverage
     nosexcover
+    mock
 
 [testenv:docs]
 basepython =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/transaction-1.6.0/transaction/_manager.py 
new/transaction-1.6.1/transaction/_manager.py
--- old/transaction-1.6.0/transaction/_manager.py       2016-05-05 
14:35:33.000000000 +0200
+++ new/transaction-1.6.1/transaction/_manager.py       2016-06-10 
23:45:55.000000000 +0200
@@ -89,6 +89,8 @@
         """ See ITransactionManager.
         """
         self._synchs.add(synch)
+        if self._txn is not None:
+            synch.newTransaction(self._txn)
 
     def unregisterSynch(self, synch):
         """ See ITransactionManager.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/transaction-1.6.0/transaction/_manager.py~ 
new/transaction-1.6.1/transaction/_manager.py~
--- old/transaction-1.6.0/transaction/_manager.py~      2013-09-09 
23:05:20.000000000 +0200
+++ new/transaction-1.6.1/transaction/_manager.py~      2016-05-05 
14:35:33.000000000 +0200
@@ -95,6 +95,16 @@
         """
         self._synchs.remove(synch)
 
+    def clearSynchs(self):
+        """ See ITransactionManager.
+        """
+        self._synchs.clear()
+
+    def registeredSynchs(self):
+        """ See ITransactionManager.
+        """
+        return bool(self._synchs)
+
     def isDoomed(self):
         """ See ITransactionManager.
         """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/transaction-1.6.0/transaction/interfaces.py 
new/transaction-1.6.1/transaction/interfaces.py
--- old/transaction-1.6.0/transaction/interfaces.py     2016-05-21 
22:26:38.000000000 +0200
+++ new/transaction-1.6.1/transaction/interfaces.py     2016-06-10 
23:45:55.000000000 +0200
@@ -65,6 +65,10 @@
 
         Synchronizers are notified about some major events in a transaction's
         life.  See ISynchronizer for details.
+
+        If a synchronizer registers while there is an active
+        transaction, its newTransaction method will be called with the
+        active transaction.
         """
 
     def unregisterSynch(synch):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/transaction-1.6.0/transaction/interfaces.py~ 
new/transaction-1.6.1/transaction/interfaces.py~
--- old/transaction-1.6.0/transaction/interfaces.py~    2016-05-05 
14:35:33.000000000 +0200
+++ new/transaction-1.6.1/transaction/interfaces.py~    2016-05-21 
22:26:38.000000000 +0200
@@ -298,6 +298,26 @@
         by a top-level transaction commit.
         """
 
+    def set_data(self, object, data):
+        """Hold data on behalf of an object
+
+        For objects such as data managers or their subobjects that
+        work with multiple transactions, it's convenient to store
+        transaction-specific data on the transaction itself.  The
+        transaction knows nothing about the data, but simply holds it
+        on behalf of the object.
+
+        The object passed should be the object that needs the data, as
+        opposed to simple object like a string. (Internally, the id of
+        the object is used as the key.)
+        """
+
+    def data(self, object):
+        """Retrieve data held on behalf of an object.
+
+        See set_data.
+        """
+
 class ITransactionDeprecated(Interface):
     """Deprecated parts of the transaction API."""
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/transaction-1.6.0/transaction/tests/test__manager.py 
new/transaction-1.6.1/transaction/tests/test__manager.py
--- old/transaction-1.6.0/transaction/tests/test__manager.py    2016-05-05 
14:35:33.000000000 +0200
+++ new/transaction-1.6.1/transaction/tests/test__manager.py    2016-06-10 
23:45:55.000000000 +0200
@@ -442,6 +442,27 @@
 
         assert nosub1._p_jar.ctpc_abort == 1
 
+    def test_notify_transaction_late_comers(self):
+        # If a datamanager registers for synchonization after a
+        # transaction has started, we should call newTransaction so it
+        # can do necessry setup.
+        import mock
+        from .. import TransactionManager
+        manager = TransactionManager()
+        sync1 = mock.MagicMock()
+        manager.registerSynch(sync1)
+        sync1.newTransaction.assert_not_called()
+        t = manager.begin()
+        sync1.newTransaction.assert_called_with(t)
+        sync2 = mock.MagicMock()
+        manager.registerSynch(sync2)
+        sync2.newTransaction.assert_called_with(t)
+
+        # for, um, completeness
+        t.commit()
+        for s in sync1, sync2:
+            s.beforeCompletion.assert_called_with(t)
+            s.afterCompletion.assert_called_with(t)
 
 class AttemptTests(unittest.TestCase):
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/transaction-1.6.0/transaction/tests/test__manager.py~ 
new/transaction-1.6.1/transaction/tests/test__manager.py~
--- old/transaction-1.6.0/transaction/tests/test__manager.py~   2015-01-13 
17:49:42.000000000 +0100
+++ new/transaction-1.6.1/transaction/tests/test__manager.py~   2016-05-05 
14:35:33.000000000 +0200
@@ -105,12 +105,27 @@
         tm = self._makeOne()
         synch1 = DummySynch()
         synch2 = DummySynch()
+        self.assertFalse(tm.registeredSynchs())
         tm.registerSynch(synch1)
+        self.assertTrue(tm.registeredSynchs())
         tm.registerSynch(synch2)
+        self.assertTrue(tm.registeredSynchs())
         tm.unregisterSynch(synch1)
+        self.assertTrue(tm.registeredSynchs())
         self.assertEqual(len(tm._synchs), 1)
         self.assertFalse(synch1 in tm._synchs)
         self.assertTrue(synch2 in tm._synchs)
+        tm.unregisterSynch(synch2)
+        self.assertFalse(tm.registeredSynchs())
+
+    def test_clearSynchs(self):
+        tm = self._makeOne()
+        synch1 = DummySynch()
+        synch2 = DummySynch()
+        tm.registerSynch(synch1)
+        tm.registerSynch(synch2)
+        tm.clearSynchs()
+        self.assertEqual(len(tm._synchs), 0)
 
     def test_isDoomed_wo_existing_txn(self):
         tm = self._makeOne()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/transaction-1.6.0/transaction.egg-info/PKG-INFO 
new/transaction-1.6.1/transaction.egg-info/PKG-INFO
--- old/transaction-1.6.0/transaction.egg-info/PKG-INFO 2016-05-21 
22:28:39.000000000 +0200
+++ new/transaction-1.6.1/transaction.egg-info/PKG-INFO 2016-06-10 
23:47:24.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: transaction
-Version: 1.6.0
+Version: 1.6.1
 Summary: Transaction management for Python
 Home-page: http://www.zope.org/Products/ZODB
 Author: Zope Corporation
@@ -36,6 +36,13 @@
         Changes
         =======
         
+        1.6.1 (2016-06-10)
+        ------------------
+        
+        - Fixed: Synchonizers that registered with transaction managers when
+          transactions were in progress didn't have their newTransaction
+          methods called to let them know of the in-progress transactions.
+        
         1.6.0 (2016-05-21)
         ------------------
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/transaction-1.6.0/transaction.egg-info/requires.txt 
new/transaction-1.6.1/transaction.egg-info/requires.txt
--- old/transaction-1.6.0/transaction.egg-info/requires.txt     2016-05-21 
22:28:39.000000000 +0200
+++ new/transaction-1.6.1/transaction.egg-info/requires.txt     2016-06-10 
23:47:24.000000000 +0200
@@ -4,6 +4,10 @@
 Sphinx
 repoze.sphinx.autointerface
 
+[test]
+mock
+
 [testing]
 nose
 coverage
+mock


Reply via email to