Hello community,

here is the log from the commit of package python-amqpstorm for 
openSUSE:Factory checked in at 2019-09-27 14:47:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-amqpstorm (Old)
 and      /work/SRC/openSUSE:Factory/.python-amqpstorm.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-amqpstorm"

Fri Sep 27 14:47:33 2019 rev:8 rq:730723 version:2.7.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-amqpstorm/python-amqpstorm.changes        
2019-07-21 11:34:34.552774952 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-amqpstorm.new.2352/python-amqpstorm.changes  
    2019-09-27 14:47:34.868900077 +0200
@@ -1,0 +2,7 @@
+Fri Sep 13 13:03:54 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 2.7.1:
+  * Fixed Connection close taking longer than intended when using SSL [#75]- 
Thanks troglas.
+  * Fixed an issue with closing Channels taking too long after the server 
initiated it.
+
+-------------------------------------------------------------------

Old:
----
  AMQPStorm-2.7.0.tar.gz

New:
----
  AMQPStorm-2.7.1.tar.gz

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

Other differences:
------------------
++++++ python-amqpstorm.spec ++++++
--- /var/tmp/diff_new_pack.MySZxA/_old  2019-09-27 14:47:35.520898382 +0200
+++ /var/tmp/diff_new_pack.MySZxA/_new  2019-09-27 14:47:35.524898371 +0200
@@ -18,16 +18,13 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-amqpstorm
-Version:        2.7.0
+Version:        2.7.1
 Release:        0
 Summary:        Thread-safe Python RabbitMQ Client & Management library
 License:        MIT
 Group:          Development/Languages/Python
 URL:            https://github.com/eandersson/amqpstorm
 Source:         
https://files.pythonhosted.org/packages/source/A/AMQPStorm/AMQPStorm-%{version}.tar.gz
-%if 0%{?suse_version} < 1500
-BuildRequires:  python
-%endif
 BuildRequires:  %{python_module mock}
 BuildRequires:  %{python_module nose-timer}
 BuildRequires:  %{python_module nose}
@@ -39,6 +36,9 @@
 Requires:       python-pamqp >= 2.0.0
 Requires:       python-requests
 BuildArch:      noarch
+%if 0%{?suse_version} < 1500
+BuildRequires:  python
+%endif
 %python_subpackages
 
 %description

++++++ AMQPStorm-2.7.0.tar.gz -> AMQPStorm-2.7.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/AMQPStorm-2.7.0/AMQPStorm.egg-info/PKG-INFO 
new/AMQPStorm-2.7.1/AMQPStorm.egg-info/PKG-INFO
--- old/AMQPStorm-2.7.0/AMQPStorm.egg-info/PKG-INFO     2019-04-20 
08:26:18.000000000 +0200
+++ new/AMQPStorm-2.7.1/AMQPStorm.egg-info/PKG-INFO     2019-06-18 
06:07:36.000000000 +0200
@@ -1,11 +1,12 @@
-Metadata-Version: 2.1
+Metadata-Version: 1.1
 Name: AMQPStorm
-Version: 2.7.0
+Version: 2.7.1
 Summary: Thread-safe Python RabbitMQ Client & Management library.
 Home-page: https://www.amqpstorm.io
 Author: Erik Olof Gunnar Andersson
 Author-email: [email protected]
 License: MIT License
+Description-Content-Type: UNKNOWN
 Description: AMQPStorm
         =========
         Thread-safe Python RabbitMQ Client & Management library.
@@ -28,6 +29,11 @@
         Changelog
         =========
         
+        Version 2.7.1
+        -------------
+        - Fixed Connection close taking longer than intended when using SSL 
[#75]- Thanks troglas.
+        - Fixed an issue with closing Channels taking too long after the 
server initiated it.
+        
         Version 2.7.0
         -------------
         - Added support for passing your own ssl context [#71] - Thanks 
troglas.
@@ -95,4 +101,3 @@
 Classifier: Topic :: Software Development :: Libraries
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Topic :: System :: Networking
-Provides-Extra: management
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/AMQPStorm-2.7.0/CHANGELOG.rst 
new/AMQPStorm-2.7.1/CHANGELOG.rst
--- old/AMQPStorm-2.7.0/CHANGELOG.rst   2019-04-20 08:25:42.000000000 +0200
+++ new/AMQPStorm-2.7.1/CHANGELOG.rst   2019-06-18 06:07:25.000000000 +0200
@@ -1,6 +1,11 @@
 Changelog
 =========
 
+Version 2.7.1
+-------------
+- Fixed Connection close taking longer than intended when using SSL [#75]- 
Thanks troglas.
+- Fixed an issue with closing Channels taking too long after the server 
initiated it.
+
 Version 2.7.0
 -------------
 - Added support for passing your own ssl context [#71] - Thanks troglas.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/AMQPStorm-2.7.0/PKG-INFO new/AMQPStorm-2.7.1/PKG-INFO
--- old/AMQPStorm-2.7.0/PKG-INFO        2019-04-20 08:26:18.000000000 +0200
+++ new/AMQPStorm-2.7.1/PKG-INFO        2019-06-18 06:07:36.000000000 +0200
@@ -1,11 +1,12 @@
-Metadata-Version: 2.1
+Metadata-Version: 1.1
 Name: AMQPStorm
-Version: 2.7.0
+Version: 2.7.1
 Summary: Thread-safe Python RabbitMQ Client & Management library.
 Home-page: https://www.amqpstorm.io
 Author: Erik Olof Gunnar Andersson
 Author-email: [email protected]
 License: MIT License
+Description-Content-Type: UNKNOWN
 Description: AMQPStorm
         =========
         Thread-safe Python RabbitMQ Client & Management library.
@@ -28,6 +29,11 @@
         Changelog
         =========
         
+        Version 2.7.1
+        -------------
+        - Fixed Connection close taking longer than intended when using SSL 
[#75]- Thanks troglas.
+        - Fixed an issue with closing Channels taking too long after the 
server initiated it.
+        
         Version 2.7.0
         -------------
         - Added support for passing your own ssl context [#71] - Thanks 
troglas.
@@ -95,4 +101,3 @@
 Classifier: Topic :: Software Development :: Libraries
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Topic :: System :: Networking
-Provides-Extra: management
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/AMQPStorm-2.7.0/README.rst 
new/AMQPStorm-2.7.1/README.rst
--- old/AMQPStorm-2.7.0/README.rst      2019-04-20 08:25:42.000000000 +0200
+++ new/AMQPStorm-2.7.1/README.rst      2019-06-18 06:07:25.000000000 +0200
@@ -20,6 +20,11 @@
 Changelog
 =========
 
+Version 2.7.1
+-------------
+- Fixed Connection close taking longer than intended when using SSL [#75]- 
Thanks troglas.
+- Fixed an issue with closing Channels taking too long after the server 
initiated it.
+
 Version 2.7.0
 -------------
 - Added support for passing your own ssl context [#71] - Thanks troglas.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/AMQPStorm-2.7.0/amqpstorm/__init__.py 
new/AMQPStorm-2.7.1/amqpstorm/__init__.py
--- old/AMQPStorm-2.7.0/amqpstorm/__init__.py   2019-04-20 08:25:42.000000000 
+0200
+++ new/AMQPStorm-2.7.1/amqpstorm/__init__.py   2019-06-18 06:07:25.000000000 
+0200
@@ -1,5 +1,5 @@
 """AMQPStorm."""
-__version__ = '2.7.0'  # noqa
+__version__ = '2.7.1'  # noqa
 __author__ = 'eandersson'  # noqa
 
 import logging
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/AMQPStorm-2.7.0/amqpstorm/channel.py 
new/AMQPStorm-2.7.1/amqpstorm/channel.py
--- old/AMQPStorm-2.7.0/amqpstorm/channel.py    2019-04-20 08:25:42.000000000 
+0200
+++ new/AMQPStorm-2.7.1/amqpstorm/channel.py    2019-06-18 06:07:25.000000000 
+0200
@@ -457,25 +457,15 @@
         :param specification.Channel.Close frame_in: Channel Close frame.
         :return:
         """
-        if frame_in.reply_code != 200:
-            reply_text = try_utf8_decode(frame_in.reply_text)
-            message = (
-                'Channel %d was closed by remote server: %s' %
-                (
-                    self._channel_id,
-                    reply_text
-                )
-            )
-            exception = AMQPChannelError(message,
-                                         reply_code=frame_in.reply_code)
-            self.exceptions.append(exception)
         self.set_state(self.CLOSED)
-        if self._connection.is_open:
-
-            try:
-                self._connection.write_frame(
-                    self.channel_id, specification.Channel.CloseOk()
-                )
-            except AMQPConnectionError:
-                pass
-        self.close()
+        self.remove_consumer_tag()
+        if self._inbound:
+            del self._inbound[:]
+        self.exceptions.append(AMQPChannelError(
+            'Channel %d was closed by remote server: %s' %
+            (
+                self._channel_id,
+                try_utf8_decode(frame_in.reply_text)
+            ),
+            reply_code=frame_in.reply_code
+        ))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/AMQPStorm-2.7.0/amqpstorm/io.py 
new/AMQPStorm-2.7.1/amqpstorm/io.py
--- old/AMQPStorm-2.7.0/amqpstorm/io.py 2019-04-20 08:25:42.000000000 +0200
+++ new/AMQPStorm-2.7.1/amqpstorm/io.py 2019-06-18 06:07:25.000000000 +0200
@@ -76,17 +76,17 @@
         self._rd_lock.acquire()
         try:
             self._running.clear()
-            if self.socket:
-                self._close_socket()
-            if self._inbound_thread:
-                self._inbound_thread.join(timeout=self._parameters['timeout'])
-            self._inbound_thread = None
-            self.poller = None
+            self._close_socket()
             self.socket = None
+            self.poller = None
         finally:
             self._wr_lock.release()
             self._rd_lock.release()
 
+        if self._inbound_thread:
+            self._inbound_thread.join(timeout=self._parameters['timeout'])
+        self._inbound_thread = None
+
     def open(self):
         """Open Socket and establish a connection.
 
@@ -143,10 +143,15 @@
 
         :return:
         """
+        if not self.socket:
+            return
         try:
+            if self.use_ssl:
+                self.socket.unwrap()
             self.socket.shutdown(socket.SHUT_RDWR)
-        except (OSError, socket.error):
+        except (OSError, socket.error, ValueError):
             pass
+
         self.socket.close()
 
     def _get_socket_addresses(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/AMQPStorm-2.7.0/amqpstorm/tests/functional/reliability_tests.py 
new/AMQPStorm-2.7.1/amqpstorm/tests/functional/reliability_tests.py
--- old/AMQPStorm-2.7.0/amqpstorm/tests/functional/reliability_tests.py 
2019-04-20 08:25:42.000000000 +0200
+++ new/AMQPStorm-2.7.1/amqpstorm/tests/functional/reliability_tests.py 
2019-06-18 06:07:25.000000000 +0200
@@ -135,12 +135,35 @@
 
         :return:
         """
-        for _ in range(100):
+        for _ in range(10):
             self.connection = self.connection = Connection(HOST, USERNAME,
                                                            PASSWORD)
             start_time = time.time()
             self.connection.close()
             self.assertLess(time.time() - start_time, 3)
+
+    @setup(new_connection=False, queue=False)
+    def test_functional_close_after_channel_close_forced_by_server(self):
+        """Make sure the channel is closed instantly when the remote server
+        closes it.
+
+        :return:
+        """
+        for _ in range(10):
+            self.connection = self.connection = Connection(HOST, USERNAME,
+                                                           PASSWORD)
+            self.channel = self.connection.channel(rpc_timeout=360)
+
+            start_time = time.time()
+            self.channel.basic.publish(body=self.message,
+                                       routing_key=self.queue_name,
+                                       exchange='invalid')
+            self.channel.close()
+            self.assertLess(time.time() - start_time, 3)
+
+            start_time = time.time()
+            self.connection.close()
+            self.assertLess(time.time() - start_time, 3)
 
     @setup(new_connection=False)
     def test_functional_uri_connection(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/AMQPStorm-2.7.0/amqpstorm/tests/functional/ssl/reliability_tests.py 
new/AMQPStorm-2.7.1/amqpstorm/tests/functional/ssl/reliability_tests.py
--- old/AMQPStorm-2.7.0/amqpstorm/tests/functional/ssl/reliability_tests.py     
2019-04-20 08:25:42.000000000 +0200
+++ new/AMQPStorm-2.7.1/amqpstorm/tests/functional/ssl/reliability_tests.py     
2019-06-18 06:07:25.000000000 +0200
@@ -116,7 +116,7 @@
         }
         self.connection = self.connection = Connection(
             SSL_HOST, USERNAME, PASSWORD, port=5671, ssl=True,
-            ssl_options=ssl_options, timeout=1, lazy=True)
+            ssl_options=ssl_options, lazy=True)
 
         for _ in range(5):
             channels = []
@@ -136,14 +136,14 @@
 
         :return:
         """
-        for _ in range(100):
+        for _ in range(10):
             ssl_options = {
                 'context': ssl.create_default_context(cafile=CAFILE),
                 'server_hostname': SSL_HOST
             }
             self.connection = self.connection = Connection(
-                SSL_HOST, USERNAME, PASSWORD, port=5671, ssl=True,
-                ssl_options=ssl_options, lazy=True)
+                SSL_HOST, USERNAME, PASSWORD, timeout=60, port=5671, ssl=True,
+                ssl_options=ssl_options)
 
             start_time = time.time()
             self.connection.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/AMQPStorm-2.7.0/amqpstorm/tests/unit/channel/channel_exception_tests.py 
new/AMQPStorm-2.7.1/amqpstorm/tests/unit/channel/channel_exception_tests.py
--- old/AMQPStorm-2.7.0/amqpstorm/tests/unit/channel/channel_exception_tests.py 
2019-04-20 08:25:42.000000000 +0200
+++ new/AMQPStorm-2.7.1/amqpstorm/tests/unit/channel/channel_exception_tests.py 
2019-06-18 06:07:25.000000000 +0200
@@ -187,7 +187,7 @@
         # Set up Fake Channel.
         channel._inbound = [1, 2, 3]
         channel.set_state(channel.OPEN)
-        channel._consumer_tags = [1, 2, 3]
+        channel._consumer_tags = [4, 5, 6]
 
         close_frame = specification.Channel.Close(
             reply_code=500,
@@ -199,11 +199,6 @@
         self.assertEqual(channel._consumer_tags, [])
         self.assertEqual(channel._state, channel.CLOSED)
 
-        self.assertIsInstance(
-            connection.get_last_frame(),
-            specification.Channel.CloseOk
-        )
-
         self.assertRaisesRegexp(
             AMQPChannelError,
             'Channel 0 was closed by remote server: travis-ci',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/AMQPStorm-2.7.0/amqpstorm/tests/unit/channel/channel_frame_tests.py 
new/AMQPStorm-2.7.1/amqpstorm/tests/unit/channel/channel_frame_tests.py
--- old/AMQPStorm-2.7.0/amqpstorm/tests/unit/channel/channel_frame_tests.py     
2019-04-20 08:25:42.000000000 +0200
+++ new/AMQPStorm-2.7.1/amqpstorm/tests/unit/channel/channel_frame_tests.py     
2019-06-18 06:07:25.000000000 +0200
@@ -97,11 +97,6 @@
             )
         )
 
-        self.assertIsInstance(
-            connection.get_last_frame(),
-            specification.Channel.CloseOk
-        )
-
         self.assertRaisesRegexp(
             AMQPChannelError,
             'Channel 0 was closed by remote server: travis-ci',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/AMQPStorm-2.7.0/amqpstorm/tests/unit/channel/channel_tests.py 
new/AMQPStorm-2.7.1/amqpstorm/tests/unit/channel/channel_tests.py
--- old/AMQPStorm-2.7.0/amqpstorm/tests/unit/channel/channel_tests.py   
2019-04-20 08:25:42.000000000 +0200
+++ new/AMQPStorm-2.7.1/amqpstorm/tests/unit/channel/channel_tests.py   
2019-06-18 06:07:25.000000000 +0200
@@ -68,7 +68,7 @@
         # Set up Fake Channel.
         channel._inbound = [1, 2, 3]
         channel.set_state(channel.OPEN)
-        channel._consumer_tags = ['1', '2', '3']
+        channel._consumer_tags = ['4', '5', '6']
 
         # Close Channel.
         channel.close()
@@ -89,7 +89,7 @@
         # Set up Fake Channel.
         channel._inbound = [1, 2, 3]
         channel.set_state(channel.OPEN)
-        channel._consumer_tags = ['1', '2', '3']
+        channel._consumer_tags = ['4', '5', '6']
         channel.exceptions.append(AMQPChannelError('travis-ci'))
 
         # Close Channel.
@@ -107,7 +107,7 @@
         # Set up Fake Channel.
         channel._inbound = [1, 2, 3]
         channel.set_state(channel.CLOSED)
-        channel._consumer_tags = ['1', '2', '3']
+        channel._consumer_tags = ['4', '5', '6']
 
         def state_set(state):
             self.assertEqual(state, channel.CLOSED)
@@ -142,7 +142,7 @@
         # Set up Fake Channel.
         channel._inbound = [1, 2, 3]
         channel.set_state(channel.OPEN)
-        channel._consumer_tags = [1, 2, 3]
+        channel._consumer_tags = [4, 5, 6]
 
         close_frame = specification.Channel.Close(reply_code=200,
                                                   reply_text='travis-ci')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/AMQPStorm-2.7.0/setup.py new/AMQPStorm-2.7.1/setup.py
--- old/AMQPStorm-2.7.0/setup.py        2019-04-20 08:25:42.000000000 +0200
+++ new/AMQPStorm-2.7.1/setup.py        2019-06-18 06:07:25.000000000 +0200
@@ -3,7 +3,7 @@
 
 setup(
     name='AMQPStorm',
-    version='2.7.0',
+    version='2.7.1',
     description='Thread-safe Python RabbitMQ Client & Management library.',
     long_description=open('README.rst').read(),
     author='Erik Olof Gunnar Andersson',


Reply via email to