Hello community,

here is the log from the commit of package python-amqp for openSUSE:Factory 
checked in at 2019-06-13 22:32:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-amqp (Old)
 and      /work/SRC/openSUSE:Factory/.python-amqp.new.4811 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-amqp"

Thu Jun 13 22:32:49 2019 rev:28 rq:708413 version:2.5.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-amqp/python-amqp.changes  2019-03-06 
15:52:16.980425218 +0100
+++ /work/SRC/openSUSE:Factory/.python-amqp.new.4811/python-amqp.changes        
2019-06-13 22:32:51.124390922 +0200
@@ -1,0 +2,8 @@
+Fri Jun  7 14:40:51 UTC 2019 - Marketa Calabkova <mcalabk...@suse.com>
+
+- Update to 2.5.0
+  - Drop Python 3.4
+  - Add new platform
+  - Numerious bug fixes
+
+-------------------------------------------------------------------

Old:
----
  amqp-2.4.2.tar.gz

New:
----
  amqp-2.5.0.tar.gz

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

Other differences:
------------------
++++++ python-amqp.spec ++++++
--- /var/tmp/diff_new_pack.ALvpdQ/_old  2019-06-13 22:32:51.848390686 +0200
+++ /var/tmp/diff_new_pack.ALvpdQ/_new  2019-06-13 22:32:51.848390686 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-amqp
-Version:        2.4.2
+Version:        2.5.0
 Release:        0
 Summary:        Low-level AMQP client for Python (fork of amqplib)
 License:        LGPL-2.1-or-later

++++++ amqp-2.4.2.tar.gz -> amqp-2.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-2.4.2/Changelog new/amqp-2.5.0/Changelog
--- old/amqp-2.4.2/Changelog    2019-03-03 21:46:32.000000000 +0100
+++ new/amqp-2.5.0/Changelog    2019-05-30 13:07:00.000000000 +0200
@@ -5,6 +5,17 @@
 The previous amqplib changelog is here:
 http://code.google.com/p/py-amqplib/source/browse/CHANGES
 
+.. _version-2.5.0:
+
+2.5.0
+=====
+:release-date: 2019-05-30 17.30 P.M UTC+6:00
+:release-by: Asif Saif Uddin
+
+- Drop Python 3.4
+- Add new platform
+- Numerious bug fixes
+
 .. _version-2.4.2:
 
 2.4.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-2.4.2/PKG-INFO new/amqp-2.5.0/PKG-INFO
--- old/amqp-2.4.2/PKG-INFO     2019-03-03 21:48:04.000000000 +0100
+++ new/amqp-2.5.0/PKG-INFO     2019-05-30 13:08:20.000000000 +0200
@@ -1,11 +1,11 @@
 Metadata-Version: 1.2
 Name: amqp
-Version: 2.4.2
+Version: 2.5.0
 Summary: Low-level AMQP client for Python (fork of amqplib).
 Home-page: http://github.com/celery/py-amqp
 Author: Barry Pederson
 Author-email: pya...@celeryproject.org
-Maintainer: Ask Solem
+Maintainer: Asif Saif Uddin, Omer Katz
 License: BSD
 Description: 
=====================================================================
          Python AMQP 0.9.1 client library
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-2.4.2/amqp/__init__.py 
new/amqp-2.5.0/amqp/__init__.py
--- old/amqp-2.4.2/amqp/__init__.py     2019-03-03 21:47:25.000000000 +0100
+++ new/amqp-2.5.0/amqp/__init__.py     2019-05-30 13:05:09.000000000 +0200
@@ -6,9 +6,9 @@
 
 from collections import namedtuple
 
-__version__ = '2.4.2'
+__version__ = '2.5.0'
 __author__ = 'Barry Pederson'
-__maintainer__ = 'Ask Solem'
+__maintainer__ = 'Asif Saif Uddin, Omer Katz'
 __contact__ = 'pya...@celeryproject.org'
 __homepage__ = 'http://github.com/celery/py-amqp'
 __docformat__ = 'restructuredtext'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-2.4.2/amqp/platform.py 
new/amqp-2.5.0/amqp/platform.py
--- old/amqp-2.4.2/amqp/platform.py     2019-03-02 14:49:57.000000000 +0100
+++ new/amqp-2.5.0/amqp/platform.py     2019-05-30 13:04:06.000000000 +0200
@@ -48,6 +48,7 @@
     if platform.release().endswith("Microsoft"):
         KNOWN_TCP_OPTS = {'TCP_NODELAY', 'TCP_KEEPIDLE', 'TCP_KEEPINTVL',
                           'TCP_KEEPCNT'}
+
 elif sys.platform.startswith('darwin'):
     KNOWN_TCP_OPTS.remove('TCP_USER_TIMEOUT')
 
@@ -62,6 +63,17 @@
 elif sys.platform.startswith('cygwin'):
     KNOWN_TCP_OPTS = {'TCP_NODELAY'}
 
+# illumos does not allow to set the TCP_MAXSEG socket option,
+# even if the Oracle documentation says otherwise.
+elif sys.platform.startswith('sunos'):
+    KNOWN_TCP_OPTS.remove('TCP_MAXSEG')
+
+# aix does not allow to set the TCP_MAXSEG
+# or the TCP_USER_TIMEOUT socket options.
+elif sys.platform.startswith('aix'):
+    KNOWN_TCP_OPTS.remove('TCP_MAXSEG')
+    KNOWN_TCP_OPTS.remove('TCP_USER_TIMEOUT')
+
 if sys.version_info < (2, 7, 7):  # pragma: no cover
     import functools
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-2.4.2/amqp/transport.py 
new/amqp-2.5.0/amqp/transport.py
--- old/amqp-2.4.2/amqp/transport.py    2019-03-02 14:49:56.000000000 +0100
+++ new/amqp-2.5.0/amqp/transport.py    2019-05-30 13:04:06.000000000 +0200
@@ -6,6 +6,7 @@
 import re
 import socket
 import ssl
+from ssl import SSLError
 from contextlib import contextmanager
 
 from .exceptions import UnexpectedFrame
@@ -13,11 +14,6 @@
 from .platform import KNOWN_TCP_OPTS, SOL_TCP, pack, unpack
 from .utils import get_errno, set_cloexec
 
-try:
-    from ssl import SSLError
-except ImportError:  # pragma: no cover
-    class SSLError(Exception):  # noqa
-        """Dummy SSL exception."""
 
 _UNAVAIL = {errno.EAGAIN, errno.EINTR, errno.ENOENT, errno.EWOULDBLOCK}
 
@@ -329,24 +325,31 @@
         Default `ssl.wrap_socket` method augmented with support for
         setting the server_hostname field required for SNI hostname header
         """
-        opts = dict(sock=sock, keyfile=keyfile, certfile=certfile,
-                    server_side=server_side, cert_reqs=cert_reqs,
-                    ca_certs=ca_certs,
-                    do_handshake_on_connect=do_handshake_on_connect,
-                    suppress_ragged_eofs=suppress_ragged_eofs,
-                    ciphers=ciphers)
         # Setup the right SSL version; default to optimal versions across
         # ssl implementations
-        if ssl_version is not None:
-            opts['ssl_version'] = ssl_version
-        else:
+        if ssl_version is None:
             # older versions of python 2.7 and python 2.6 do not have the
             # ssl.PROTOCOL_TLS defined the equivalent is ssl.PROTOCOL_SSLv23
             # we default to PROTOCOL_TLS and fallback to PROTOCOL_SSLv23
+            # TODO: Drop this once we drop Python 2.7 support
             if hasattr(ssl, 'PROTOCOL_TLS'):
-                opts['ssl_version'] = ssl.PROTOCOL_TLS
+                ssl_version = ssl.PROTOCOL_TLS
             else:
-                opts['ssl_version'] = ssl.PROTOCOL_SSLv23
+                ssl_version = ssl.PROTOCOL_SSLv23
+
+        opts = {
+            'sock': sock,
+            'keyfile': keyfile,
+            'certfile': certfile,
+            'server_side': server_side,
+            'cert_reqs': cert_reqs,
+            'ca_certs': ca_certs,
+            'do_handshake_on_connect': do_handshake_on_connect,
+            'suppress_ragged_eofs': suppress_ragged_eofs,
+            'ciphers': ciphers,
+            'ssl_version': ssl_version
+        }
+
         sock = ssl.wrap_socket(**opts)
         # Set SNI headers if supported
         if (server_hostname is not None) and (
@@ -360,13 +363,9 @@
         return sock
 
     def _shutdown_transport(self):
-        """Unwrap a Python 2.6 SSL socket, so we can call shutdown()."""
+        """Unwrap a SSL socket, so we can call shutdown()."""
         if self.sock is not None:
-            try:
-                unwrap = self.sock.unwrap
-            except AttributeError:
-                return
-            self.sock = unwrap()
+            self.sock = self.sock.unwrap()
 
     def _read(self, n, initial=False,
               _errnos=(errno.ENOENT, errno.EAGAIN, errno.EINTR)):
@@ -406,14 +405,11 @@
         while s:
             try:
                 n = write(s)
-            except (ValueError, AttributeError):
+            except ValueError:
                 # AG: sock._sslobj might become null in the meantime if the
                 # remote connection has hung up.
-                # In python 3.2, an AttributeError is raised because the SSL
-                # module tries to access self._sslobj.write (w/ self._sslobj ==
-                # None)
                 # In python 3.4, a ValueError is raised is self._sslobj is
-                # None. So much for portability... :/
+                # None.
                 n = 0
             if not n:
                 raise IOError('Socket closed')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-2.4.2/amqp/utils.py new/amqp-2.5.0/amqp/utils.py
--- old/amqp-2.4.2/amqp/utils.py        2019-03-02 14:49:57.000000000 +0100
+++ new/amqp-2.5.0/amqp/utils.py        2019-05-30 13:04:06.000000000 +0200
@@ -17,6 +17,7 @@
 try:
     from os import set_cloexec  # Python 3.4?
 except ImportError:  # pragma: no cover
+    # TODO: Drop this once we drop Python 2.7 support
     def set_cloexec(fd, cloexec):  # noqa
         """Set flag to close fd after exec."""
         if fcntl is None:
@@ -79,7 +80,7 @@
             return s.decode('utf-8', 'surrogatepass')
         return s
 else:
-
+    # TODO: Drop this once we drop Python 2.7 support
     def str_to_bytes(s):                # noqa
         """Convert str to bytes."""
         if isinstance(s, text_t):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-2.4.2/amqp.egg-info/PKG-INFO 
new/amqp-2.5.0/amqp.egg-info/PKG-INFO
--- old/amqp-2.4.2/amqp.egg-info/PKG-INFO       2019-03-03 21:48:03.000000000 
+0100
+++ new/amqp-2.5.0/amqp.egg-info/PKG-INFO       2019-05-30 13:08:18.000000000 
+0200
@@ -1,11 +1,11 @@
 Metadata-Version: 1.2
 Name: amqp
-Version: 2.4.2
+Version: 2.5.0
 Summary: Low-level AMQP client for Python (fork of amqplib).
 Home-page: http://github.com/celery/py-amqp
 Author: Barry Pederson
 Author-email: pya...@celeryproject.org
-Maintainer: Ask Solem
+Maintainer: Asif Saif Uddin, Omer Katz
 License: BSD
 Description: 
=====================================================================
          Python AMQP 0.9.1 client library
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-2.4.2/amqp.egg-info/SOURCES.txt 
new/amqp-2.5.0/amqp.egg-info/SOURCES.txt
--- old/amqp-2.4.2/amqp.egg-info/SOURCES.txt    2019-03-03 21:48:03.000000000 
+0100
+++ new/amqp-2.5.0/amqp.egg-info/SOURCES.txt    2019-05-30 13:08:18.000000000 
+0200
@@ -59,6 +59,7 @@
 requirements/test.txt
 t/__init__.py
 t/integration/__init__.py
+t/integration/conftest.py
 t/integration/test_integration.py
 t/integration/test_rmq.py
 t/unit/__init__.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-2.4.2/amqp.egg-info/requires.txt 
new/amqp-2.5.0/amqp.egg-info/requires.txt
--- old/amqp-2.4.2/amqp.egg-info/requires.txt   2019-03-03 21:48:03.000000000 
+0100
+++ new/amqp-2.5.0/amqp.egg-info/requires.txt   2019-05-30 13:08:18.000000000 
+0200
@@ -1 +1 @@
-vine>=1.1.3
+vine<5.0.0a1,>=1.1.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-2.4.2/docs/conf.py new/amqp-2.5.0/docs/conf.py
--- old/amqp-2.4.2/docs/conf.py 2019-02-27 00:02:54.000000000 +0100
+++ new/amqp-2.5.0/docs/conf.py 2019-05-30 13:04:06.000000000 +0200
@@ -7,8 +7,8 @@
     'amqp', __file__,
     project='py-amqp',
     description='Python Promises',
-    version_dev='2.4',
-    version_stable='2.3',
+    version_dev='2.5',
+    version_stable='2.4',
     canonical_url='https://amqp.readthedocs.io',
     webdomain='celeryproject.org',
     github_project='celery/py-amqp',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-2.4.2/requirements/default.txt 
new/amqp-2.5.0/requirements/default.txt
--- old/amqp-2.4.2/requirements/default.txt     2019-01-13 11:08:19.000000000 
+0100
+++ new/amqp-2.5.0/requirements/default.txt     2019-05-30 13:04:06.000000000 
+0200
@@ -1 +1 @@
-vine>=1.1.3
+vine>=1.1.3, <5.0.0a1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-2.4.2/requirements/test-ci.txt 
new/amqp-2.5.0/requirements/test-ci.txt
--- old/amqp-2.4.2/requirements/test-ci.txt     2019-03-02 14:47:16.000000000 
+0100
+++ new/amqp-2.5.0/requirements/test-ci.txt     2019-05-30 13:04:06.000000000 
+0200
@@ -1,3 +1,4 @@
 pytest-cov
 codecov
 pytest-travis-fold
+pytest-xdist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-2.4.2/requirements/test.txt 
new/amqp-2.5.0/requirements/test.txt
--- old/amqp-2.4.2/requirements/test.txt        2019-03-03 21:29:53.000000000 
+0100
+++ new/amqp-2.5.0/requirements/test.txt        2019-05-30 13:04:06.000000000 
+0200
@@ -1,3 +1,4 @@
 case>=1.3.1
 pytest>=3.0
 pytest-sugar>=0.9.1
+pytest-rerunfailures>=6.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-2.4.2/t/integration/conftest.py 
new/amqp-2.5.0/t/integration/conftest.py
--- old/amqp-2.4.2/t/integration/conftest.py    1970-01-01 01:00:00.000000000 
+0100
+++ new/amqp-2.5.0/t/integration/conftest.py    2019-05-30 13:04:06.000000000 
+0200
@@ -0,0 +1,10 @@
+from __future__ import absolute_import, unicode_literals
+
+import os
+import subprocess
+
+
+def pytest_sessionfinish(session, exitstatus):
+    tox_env_dir = os.environ.get('TOX_WORK_DIR')
+    if exitstatus and tox_env_dir:
+        subprocess.call(["bash", "./rabbitmq_logs.sh"])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-2.4.2/t/integration/test_rmq.py 
new/amqp-2.5.0/t/integration/test_rmq.py
--- old/amqp-2.4.2/t/integration/test_rmq.py    2019-03-02 14:49:58.000000000 
+0100
+++ new/amqp-2.5.0/t/integration/test_rmq.py    2019-05-30 13:04:06.000000000 
+0200
@@ -1,14 +1,23 @@
 from __future__ import absolute_import, unicode_literals
 
+import os
+
 import pytest
 
 import amqp
 from case import ANY, Mock
 
 
+@pytest.fixture
+def connection(request):
+    host = 'localhost:%s' % os.environ.get('RABBITMQ_5672_TCP', '5672')
+    vhost = getattr(request.config, "slaveinput", {}).get("slaveid", None)
+    return amqp.Connection(host=host, vhost=vhost)
+
+
 @pytest.mark.env('rabbitmq')
-def test_connect():
-    connection = amqp.Connection()
+@pytest.mark.flaky(reruns=5, reruns_delay=2)
+def test_connect(connection):
     connection.connect()
     connection.close()
 
@@ -17,29 +26,78 @@
 class test_rabbitmq_operations():
 
     @pytest.fixture(autouse=True)
-    def setup_conn(self):
-        self.connection = amqp.Connection()
+    def setup_conn(self, connection):
+        self.connection = connection
         self.connection.connect()
         self.channel = self.connection.channel()
         yield
         self.connection.close()
 
     @pytest.mark.parametrize(
-        "publish_method", ('basic_publish', 'basic_publish_confirm')
+        "publish_method,mandatory,immediate",
+        (
+            ('basic_publish', False, True),
+            ('basic_publish', True, True),
+            ('basic_publish', False, False),
+            ('basic_publish', True, False),
+            ('basic_publish_confirm', False, True),
+            ('basic_publish_confirm', True, True),
+            ('basic_publish_confirm', False, False),
+            ('basic_publish_confirm', True, False),
+        )
     )
-    def test_publish_consume(self, publish_method):
+    @pytest.mark.flaky(reruns=5, reruns_delay=2)
+    def test_publish_consume(self, publish_method, mandatory, immediate):
         callback = Mock()
         self.channel.queue_declare(
             queue='py-amqp-unittest', durable=False, exclusive=True
         )
-        getattr(self.channel, publish_method)(
-            amqp.Message('Unittest'), routing_key='py-amqp-unittest'
-        )
-        self.channel.basic_consume(
-            queue='py-amqp-unittest',
-            callback=callback,
-            consumer_tag='amq.ctag-PCmzXGkhCw_v0Zq7jXyvkg'
-        )
+        # RabbitMQ 3 removed the support for the immediate flag
+        # Since we confirm the message, RabbitMQ complains
+        # See
+        # 
http://www.rabbitmq.com/blog/2012/11/19/breaking-things-with-rabbitmq-3-0/
+        if immediate and publish_method == "basic_publish_confirm":
+            with pytest.raises(amqp.exceptions.AMQPNotImplementedError) as exc:
+                getattr(self.channel, publish_method)(
+                    amqp.Message('Unittest'),
+                    routing_key='py-amqp-unittest',
+                    mandatory=mandatory,
+                    immediate=immediate
+                )
+
+            assert exc.value.reply_code == 540
+            assert exc.value.method_name == 'Basic.publish'
+            assert exc.value.reply_text == 'NOT_IMPLEMENTED - immediate=true'
+
+            return
+        else:
+            getattr(self.channel, publish_method)(
+                amqp.Message('Unittest'),
+                routing_key='py-amqp-unittest',
+                mandatory=mandatory,
+                immediate=immediate
+            )
+        # RabbitMQ 3 removed the support for the immediate flag
+        # See
+        # 
http://www.rabbitmq.com/blog/2012/11/19/breaking-things-with-rabbitmq-3-0/
+        if immediate:
+            with pytest.raises(amqp.exceptions.AMQPNotImplementedError) as exc:
+                self.channel.basic_consume(
+                    queue='py-amqp-unittest',
+                    callback=callback,
+                    consumer_tag='amq.ctag-PCmzXGkhCw_v0Zq7jXyvkg'
+                )
+            assert exc.value.reply_code == 540
+            assert exc.value.method_name == 'Basic.publish'
+            assert exc.value.reply_text == 'NOT_IMPLEMENTED - immediate=true'
+
+            return
+        else:
+            self.channel.basic_consume(
+                queue='py-amqp-unittest',
+                callback=callback,
+                consumer_tag='amq.ctag-PCmzXGkhCw_v0Zq7jXyvkg'
+            )
         self.connection.drain_events()
         callback.assert_called_once_with(ANY)
         msg = callback.call_args[0][0]
@@ -60,6 +118,7 @@
 
         self.channel.basic_ack(msg.delivery_tag)
 
+    @pytest.mark.flaky(reruns=5, reruns_delay=2)
     def test_publish_get(self):
         self.channel.queue_declare(
             queue='py-amqp-unittest', durable=False, exclusive=True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-2.4.2/t/unit/test_transport.py 
new/amqp-2.5.0/t/unit/test_transport.py
--- old/amqp-2.4.2/t/unit/test_transport.py     2019-03-02 14:49:59.000000000 
+0100
+++ new/amqp-2.5.0/t/unit/test_transport.py     2019-05-30 13:04:06.000000000 
+0200
@@ -636,8 +636,7 @@
     def test_shutdown_transport(self):
         self.t.sock = None
         self.t._shutdown_transport()
-        self.t.sock = object()
-        self.t._shutdown_transport()
+
         sock = self.t.sock = Mock()
         self.t._shutdown_transport()
         assert self.t.sock is sock.unwrap()


Reply via email to