Hello community, here is the log from the commit of package python-amqp for openSUSE:Factory checked in at 2019-11-04 17:04:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-amqp (Old) and /work/SRC/openSUSE:Factory/.python-amqp.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-amqp" Mon Nov 4 17:04:37 2019 rev:31 rq:736422 version:2.5.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-amqp/python-amqp.changes 2019-09-23 12:08:20.701896110 +0200 +++ /work/SRC/openSUSE:Factory/.python-amqp.new.2990/python-amqp.changes 2019-11-04 17:04:37.920147389 +0100 @@ -1,0 +2,9 @@ +Wed Oct 9 08:40:24 UTC 2019 - Tomáš Chvátal <[email protected]> + +- Update to 2.5.2: + - Ignore all methods except Close and Close-OK when channel/connection is closing + - Fix faulty ssl sni intiation parameters (#283) + - Undeprecate auto_delete flag for exchanges. (#287) + - Improved tests and testing environments + +------------------------------------------------------------------- Old: ---- amqp-2.5.1.tar.gz New: ---- amqp-2.5.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-amqp.spec ++++++ --- /var/tmp/diff_new_pack.YsiCD6/_old 2019-11-04 17:04:38.496148005 +0100 +++ /var/tmp/diff_new_pack.YsiCD6/_new 2019-11-04 17:04:38.496148005 +0100 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-amqp -Version: 2.5.1 +Version: 2.5.2 Release: 0 Summary: Low-level AMQP client for Python (fork of amqplib) License: LGPL-2.1-or-later ++++++ amqp-2.5.1.tar.gz -> amqp-2.5.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-2.5.1/Changelog new/amqp-2.5.2/Changelog --- old/amqp-2.5.1/Changelog 2019-08-14 17:48:25.000000000 +0200 +++ new/amqp-2.5.2/Changelog 2019-09-30 14:52:24.000000000 +0200 @@ -5,6 +5,19 @@ The previous amqplib changelog is here: http://code.google.com/p/py-amqplib/source/browse/CHANGES +.. _version-2.5.2: + +2.5.2 +===== +:release-date: 2019-09-30 19.00 P.M UTC+6:00 +:release-by: Asif Saif Uddin + +- Ignore all methods except Close and Close-OK when channel/connection is closing +- Fix faulty ssl sni intiation parameters (#283) +- Undeprecate auto_delete flag for exchanges. (#287) +- Improved tests and testing environments + + .. _version-2.5.1: 2.5.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-2.5.1/PKG-INFO new/amqp-2.5.2/PKG-INFO --- old/amqp-2.5.1/PKG-INFO 2019-08-14 17:50:13.000000000 +0200 +++ new/amqp-2.5.2/PKG-INFO 2019-09-30 15:03:23.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: amqp -Version: 2.5.1 +Version: 2.5.2 Summary: Low-level AMQP client for Python (fork of amqplib). Home-page: http://github.com/celery/py-amqp Author: Barry Pederson @@ -13,7 +13,7 @@ |build-status| |coverage| |license| |wheel| |pyversion| |pyimp| - :Version: 2.5.1 + :Version: 2.5.2 :Web: https://amqp.readthedocs.io/ :Download: https://pypi.org/project/amqp/ :Source: http://github.com/celery/py-amqp/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-2.5.1/README.rst new/amqp-2.5.2/README.rst --- old/amqp-2.5.1/README.rst 2019-08-14 17:48:25.000000000 +0200 +++ new/amqp-2.5.2/README.rst 2019-09-30 14:58:55.000000000 +0200 @@ -4,7 +4,7 @@ |build-status| |coverage| |license| |wheel| |pyversion| |pyimp| -:Version: 2.5.1 +:Version: 2.5.2 :Web: https://amqp.readthedocs.io/ :Download: https://pypi.org/project/amqp/ :Source: http://github.com/celery/py-amqp/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-2.5.1/amqp/__init__.py new/amqp-2.5.2/amqp/__init__.py --- old/amqp-2.5.1/amqp/__init__.py 2019-08-14 17:49:02.000000000 +0200 +++ new/amqp-2.5.2/amqp/__init__.py 2019-09-30 14:58:17.000000000 +0200 @@ -6,7 +6,7 @@ from collections import namedtuple -__version__ = '2.5.1' +__version__ = '2.5.2' __author__ = 'Barry Pederson' __maintainer__ = 'Asif Saif Uddin, Omer Katz' __contact__ = '[email protected]' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-2.5.1/amqp/connection.py new/amqp-2.5.2/amqp/connection.py --- old/amqp-2.5.1/amqp/connection.py 2019-07-12 07:25:19.000000000 +0200 +++ new/amqp-2.5.2/amqp/connection.py 2019-09-30 14:34:47.000000000 +0200 @@ -487,14 +487,15 @@ Fetch a Channel object identified by the numeric channel_id, or create that object if it doesn't already exist. """ - if self.channels is not None: - try: - return self.channels[channel_id] - except KeyError: - channel = self.Channel(self, channel_id, on_open=callback) - channel.open() - return channel - raise RecoverableConnectionError('Connection already closed.') + if self.channels is None: + raise RecoverableConnectionError('Connection already closed.') + + try: + return self.channels[channel_id] + except KeyError: + channel = self.Channel(self, channel_id, on_open=callback) + channel.open() + return channel def is_alive(self): raise NotImplementedError('Use AMQP heartbeats') @@ -510,6 +511,9 @@ return self.on_inbound_frame(frame) def on_inbound_method(self, channel_id, method_sig, payload, content): + if self.channels is None: + raise RecoverableConnectionError('Connection already closed') + return self.channels[channel_id].dispatch_method( method_sig, payload, content, ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-2.5.1/amqp.egg-info/PKG-INFO new/amqp-2.5.2/amqp.egg-info/PKG-INFO --- old/amqp-2.5.1/amqp.egg-info/PKG-INFO 2019-08-14 17:50:13.000000000 +0200 +++ new/amqp-2.5.2/amqp.egg-info/PKG-INFO 2019-09-30 15:03:23.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: amqp -Version: 2.5.1 +Version: 2.5.2 Summary: Low-level AMQP client for Python (fork of amqplib). Home-page: http://github.com/celery/py-amqp Author: Barry Pederson @@ -13,7 +13,7 @@ |build-status| |coverage| |license| |wheel| |pyversion| |pyimp| - :Version: 2.5.1 + :Version: 2.5.2 :Web: https://amqp.readthedocs.io/ :Download: https://pypi.org/project/amqp/ :Source: http://github.com/celery/py-amqp/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-2.5.1/docs/includes/introduction.txt new/amqp-2.5.2/docs/includes/introduction.txt --- old/amqp-2.5.1/docs/includes/introduction.txt 2019-07-12 07:25:19.000000000 +0200 +++ new/amqp-2.5.2/docs/includes/introduction.txt 2019-09-30 14:58:33.000000000 +0200 @@ -1,4 +1,4 @@ -:Version: 2.4.2 +:Version: 2.5.2 :Web: https://amqp.readthedocs.io/ :Download: https://pypi.org/project/amqp/ :Source: http://github.com/celery/py-amqp/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-2.5.1/t/unit/test_connection.py new/amqp-2.5.2/t/unit/test_connection.py --- old/amqp-2.5.1/t/unit/test_connection.py 2019-07-12 07:25:19.000000000 +0200 +++ new/amqp-2.5.2/t/unit/test_connection.py 2019-09-30 14:34:47.000000000 +0200 @@ -4,14 +4,15 @@ import warnings import pytest +from case import ContextMock, Mock, call, patch from amqp import Connection, spec from amqp.connection import SSLError -from amqp.exceptions import ConnectionError, NotFound, ResourceError +from amqp.exceptions import (ConnectionError, NotFound, + RecoverableConnectionError, ResourceError) from amqp.five import items from amqp.sasl import AMQPLAIN, EXTERNAL, GSSAPI, PLAIN, SASL from amqp.transport import TCPTransport -from case import ContextMock, Mock, call, patch class test_Connection: @@ -356,6 +357,12 @@ c2 = self.conn.channel(3, callback) assert c2 is c + def test_channel_when_connection_is_closed(self): + self.conn.collect() + callback = Mock(name='callback') + with pytest.raises(RecoverableConnectionError): + self.conn.channel(3, callback) + def test_is_alive(self): with pytest.raises(NotImplementedError): self.conn.is_alive() @@ -417,6 +424,11 @@ (50, 60), 'payload', 'content', ) + def test_on_inbound_method_when_connection_is_closed(self): + self.conn.collect() + with pytest.raises(RecoverableConnectionError): + self.conn.on_inbound_method(1, (50, 60), 'payload', 'content') + def test_close(self): self.conn.collect = Mock(name='collect') self.conn.close(reply_text='foo', method_sig=spec.Channel.Open)
