Hello community,

here is the log from the commit of package python-txZMQ for openSUSE:Factory 
checked in at 2020-03-11 18:53:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-txZMQ (Old)
 and      /work/SRC/openSUSE:Factory/.python-txZMQ.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-txZMQ"

Wed Mar 11 18:53:31 2020 rev:4 rq:783704 version:0.8.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-txZMQ/python-txZMQ.changes        
2018-12-24 11:45:26.609236656 +0100
+++ /work/SRC/openSUSE:Factory/.python-txZMQ.new.3160/python-txZMQ.changes      
2020-03-11 18:55:27.143677726 +0100
@@ -1,0 +2,8 @@
+Wed Mar 11 08:57:07 UTC 2020 - pgaj...@suse.com
+
+- version update to 0.8.2
+  * Fixed bug #79 via #80
+  * Follow-up for 0.8.1: #80
+- fix deps, test package
+
+-------------------------------------------------------------------

Old:
----
  txZMQ-0.8.0.tar.gz

New:
----
  txZMQ-0.8.2.tar.gz

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

Other differences:
------------------
++++++ python-txZMQ.spec ++++++
--- /var/tmp/diff_new_pack.dI2kP6/_old  2020-03-11 18:55:28.027678121 +0100
+++ /var/tmp/diff_new_pack.dI2kP6/_new  2020-03-11 18:55:28.027678121 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-txZMQ
 #
-# Copyright (c) 2018 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
@@ -17,9 +17,8 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%bcond_with test
 Name:           python-txZMQ
-Version:        0.8.0
+Version:        0.8.2
 Release:        0
 Summary:        Twisted bindings for ZeroMQ
 License:        GPL-2.0-only
@@ -29,7 +28,14 @@
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
+Requires:       python-Twisted >= 10.0
+Requires:       python-pyzmq >= 13
 BuildArch:      noarch
+# SECTION test requirements
+BuildRequires:  %{python_module Twisted >= 10.0}
+BuildRequires:  %{python_module pytest}
+BuildRequires:  %{python_module pyzmq >= 13}
+# /SECTION
 %python_subpackages
 
 %description
@@ -45,10 +51,9 @@
 %install
 %python_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
-%if %{with test}
+
 %check
-%python_exec setup.py test
-%endif
+%pytest
 
 %files %{python_files}
 %license LICENSE.txt

++++++ txZMQ-0.8.0.tar.gz -> txZMQ-0.8.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/txZMQ-0.8.0/PKG-INFO new/txZMQ-0.8.2/PKG-INFO
--- old/txZMQ-0.8.0/PKG-INFO    2017-02-16 22:33:12.000000000 +0100
+++ new/txZMQ-0.8.2/PKG-INFO    2019-11-14 15:19:34.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: txZMQ
-Version: 0.8.0
+Version: 0.8.2
 Summary: Twisted bindings for ZeroMQ
 Home-page: https://github.com/smira/txZMQ
 Author: Andrey Smirnov
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/txZMQ-0.8.0/VERSION new/txZMQ-0.8.2/VERSION
--- old/txZMQ-0.8.0/VERSION     2017-02-16 22:26:16.000000000 +0100
+++ new/txZMQ-0.8.2/VERSION     2019-11-14 15:18:53.000000000 +0100
@@ -1 +1 @@
-0.8.0
+0.8.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/txZMQ-0.8.0/txzmq/req_rep.py 
new/txZMQ-0.8.2/txzmq/req_rep.py
--- old/txZMQ-0.8.0/txzmq/req_rep.py    2016-11-15 23:03:05.000000000 +0100
+++ new/txZMQ-0.8.2/txzmq/req_rep.py    2019-11-14 14:51:49.000000000 +0100
@@ -41,10 +41,11 @@
     UUID_POOL_GEN_SIZE = 5
 
     def __init__(self, *args, **kwargs):
-        ZmqConnection.__init__(self, *args, **kwargs)
         self._requests = {}
         self._uuids = []
 
+        ZmqConnection.__init__(self, *args, **kwargs)
+
     def _getNextId(self):
         """
         Returns an unique id.
@@ -79,7 +80,10 @@
         @param msgId: message ID to cancel
         @type msgId: C{str}
         """
-        self._requests.pop(msgId, (None, None))
+        _, canceller = self._requests.pop(msgId, (None, None))
+
+        if canceller is not None and canceller.active():
+            canceller.cancel()
 
     def _timeoutRequest(self, msgId):
         """
@@ -150,9 +154,10 @@
     socketType = constants.ROUTER
 
     def __init__(self, *args, **kwargs):
-        ZmqConnection.__init__(self, *args, **kwargs)
         self._routingInfo = {}  # keep track of routing info
 
+        ZmqConnection.__init__(self, *args, **kwargs)
+
     def reply(self, messageId, *messageParts):
         """
         Send reply to request with specified ``messageId``.
@@ -206,7 +211,7 @@
                       "either ZmqREPConnection or ZmqROUTERConnection",
                       DeprecationWarning)
         ZmqREPConnection.__init__(self, factory)
-        self.add_endpoints(endpoints)
+        self.addEndpoints(endpoints)
 
 
 class ZmqXREQConnection(ZmqREQConnection):
@@ -222,4 +227,4 @@
                       "either ZmqREQConnection or ZmqDEALERConnection",
                       DeprecationWarning)
         ZmqREQConnection.__init__(self, factory)
-        self.add_endpoints(endpoints)
+        self.addEndpoints(endpoints)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/txZMQ-0.8.0/txzmq/test/test_reactor_shutdown.py 
new/txZMQ-0.8.2/txzmq/test/test_reactor_shutdown.py
--- old/txZMQ-0.8.0/txzmq/test/test_reactor_shutdown.py 2016-11-15 
23:03:05.000000000 +0100
+++ new/txZMQ-0.8.2/txzmq/test/test_reactor_shutdown.py 2019-11-13 
21:41:58.000000000 +0100
@@ -38,4 +38,5 @@
         reactor.callWhenRunning(_test)
         reactor.run()
 
+
 globals().update(ZmqReactorShutdownTestCase.makeTestCaseClasses())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/txZMQ-0.8.0/txzmq/test/test_reqrep.py 
new/txZMQ-0.8.2/txzmq/test/test_reqrep.py
--- old/txZMQ-0.8.0/txzmq/test/test_reqrep.py   2016-11-15 23:03:05.000000000 
+0100
+++ new/txZMQ-0.8.2/txzmq/test/test_reqrep.py   2019-11-13 19:55:58.000000000 
+0100
@@ -124,6 +124,21 @@
             .addCallback(check_requests) \
             .addCallback(lambda _: _wait(0.01))
 
+    def test_cancel_with_timeout(self):
+        d = self.s.sendMsg(b'aaa', timeout=10.0)
+        d.cancel()
+
+        def check_requests(_):
+            self.assertEqual(self.s._requests, {})
+            self.failUnlessEqual(self.s.UUID_POOL_GEN_SIZE,
+                                 len(self.s._uuids) + 1)
+
+        return d.addCallbacks(lambda _: self.fail("Should have errored"),
+                              lambda fail: fail.trap(
+                              "twisted.internet.defer.CancelledError")) \
+            .addCallback(check_requests) \
+            .addCallback(lambda _: _wait(0.01))
+
     def test_send_timeout_ok(self):
         return self.s.sendMsg(b'aaa', timeout=0.1).addCallback(
             lambda response: self.assertEquals(response, [b'aaa'])


Reply via email to