Hello community,

here is the log from the commit of package python-kombu for openSUSE:Factory 
checked in at 2020-07-15 12:05:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-kombu (Old)
 and      /work/SRC/openSUSE:Factory/.python-kombu.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-kombu"

Wed Jul 15 12:05:40 2020 rev:69 rq:819679 version:4.6.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-kombu/python-kombu.changes        
2020-06-21 19:05:05.364750415 +0200
+++ /work/SRC/openSUSE:Factory/.python-kombu.new.3060/python-kombu.changes      
2020-07-15 12:06:24.268241980 +0200
@@ -1,0 +2,8 @@
+Thu Jul  9 06:20:03 UTC 2020 - Matthias Fehring <[email protected]>
+
+- update to 4.6.11
+  - Revert incompatible changes in #1193 and additional improvements (#1211)
+  - Default_channel should reconnect automatically (#1209)
+- drop unnecessary fakeredis dependency to fix build on older distros
+
+-------------------------------------------------------------------

Old:
----
  kombu-4.6.10.tar.gz

New:
----
  kombu-4.6.11.tar.gz

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

Other differences:
------------------
++++++ python-kombu.spec ++++++
--- /var/tmp/diff_new_pack.vsG50X/_old  2020-07-15 12:06:27.404245264 +0200
+++ /var/tmp/diff_new_pack.vsG50X/_new  2020-07-15 12:06:27.408245268 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-kombu
-Version:        4.6.10
+Version:        4.6.11
 Release:        0
 Summary:        AMQP Messaging Framework for Python
 License:        BSD-3-Clause
@@ -28,10 +28,9 @@
 BuildRequires:  %{python_module PyYAML >= 3.10}
 BuildRequires:  %{python_module Pyro4}
 BuildRequires:  %{python_module SQLAlchemy}
-BuildRequires:  %{python_module amqp >= 2.5.2}
+BuildRequires:  %{python_module amqp >= 2.6.0}
 BuildRequires:  %{python_module boto3 >= 1.4.4}
 BuildRequires:  %{python_module case >= 1.5.2}
-BuildRequires:  %{python_module fakeredis}
 BuildRequires:  %{python_module importlib-metadata >= 0.18}
 BuildRequires:  %{python_module msgpack}
 BuildRequires:  %{python_module pycurl >= 7.43.0.2}
@@ -41,7 +40,7 @@
 BuildRequires:  %{python_module setuptools >= 20.6.7}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-Requires:       python-amqp >= 2.5.2
+Requires:       python-amqp >= 2.6.0
 Requires:       python-importlib-metadata >= 0.18
 Requires:       python-setuptools
 Recommends:     python-Brotli >= 1.0.0

++++++ kombu-4.6.10.tar.gz -> kombu-4.6.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kombu-4.6.10/PKG-INFO new/kombu-4.6.11/PKG-INFO
--- old/kombu-4.6.10/PKG-INFO   2020-06-03 06:36:35.767641800 +0200
+++ new/kombu-4.6.11/PKG-INFO   2020-06-24 09:10:24.696935000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: kombu
-Version: 4.6.10
+Version: 4.6.11
 Summary: Messaging library for Python.
 Home-page: https://kombu.readthedocs.io
 Author: Ask Solem
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kombu-4.6.10/README.rst new/kombu-4.6.11/README.rst
--- old/kombu-4.6.10/README.rst 2020-06-03 06:33:21.000000000 +0200
+++ new/kombu-4.6.11/README.rst 2020-06-24 09:02:06.000000000 +0200
@@ -4,7 +4,7 @@
 
 |build-status| |coverage| |license| |wheel| |pyversion| |pyimp| 
|[![Downloads](https://pepy.tech/badge/kombu)](https://pepy.tech/project/kombu)|
 
-:Version: 4.6.10
+:Version: 4.6.11
 :Documentation: https://kombu.readthedocs.io/
 :Download: https://pypi.org/project/kombu/
 :Source: https://github.com/celery/kombu/
@@ -41,7 +41,7 @@
 
     * Virtual transports makes it really easy to add support for non-AMQP
       transports. There is already built-in support for `Redis`_,
-      `Amazon SQS`_, `ZooKeeper`_, `SoftLayer MQ`_ and `Pyro`_.
+      `Amazon SQS`_, `ZooKeeper`_, `SoftLayer MQ`_, `MongoDB`_ and `Pyro`_.
 
     * In-memory transport for unit testing.
 
@@ -76,6 +76,7 @@
 .. _`librabbitmq`: https://pypi.org/project/librabbitmq/
 .. _`Pyro`: https://pyro4.readthedocs.io/
 .. _`SoftLayer MQ`: https://sldn.softlayer.com/reference/messagequeueapi
+.. _`MongoDB`: https://www.mongodb.com/
 
 .. _transport-comparison:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kombu-4.6.10/docs/includes/introduction.txt 
new/kombu-4.6.11/docs/includes/introduction.txt
--- old/kombu-4.6.10/docs/includes/introduction.txt     2020-06-03 
06:31:58.000000000 +0200
+++ new/kombu-4.6.11/docs/includes/introduction.txt     2020-06-24 
09:01:34.000000000 +0200
@@ -1,4 +1,4 @@
-:Version: 4.6.10
+:Version: 4.6.11
 :Web: https://kombu.readthedocs.io/
 :Download: https://pypi.org/project/kombu/
 :Source: https://github.com/celery/kombu/
@@ -36,7 +36,7 @@
     * Virtual transports makes it really easy to add support for non-AMQP
       transports. There is already built-in support for `Redis`_,
       `Amazon SQS`_, `Azure Storage Queues`_, `Azure Service Bus`_,
-      `ZooKeeper`_, `SoftLayer MQ`_ and `Pyro`_.
+      `ZooKeeper`_, `SoftLayer MQ`_, `MongoDB`_ and `Pyro`_.
 
     * In-memory transport for unit testing.
 
@@ -73,6 +73,7 @@
 .. _`librabbitmq`: https://pypi.org/project/librabbitmq/
 .. _`Pyro`: https://pyro4.readthedocs.io/
 .. _`SoftLayer MQ`: http://www.softlayer.com/services/additional/message-queue
+.. _`MongoDB`: https://www.mongodb.com/
 
 .. _transport-comparison:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kombu-4.6.10/kombu/__init__.py 
new/kombu-4.6.11/kombu/__init__.py
--- old/kombu-4.6.10/kombu/__init__.py  2020-06-03 06:31:11.000000000 +0200
+++ new/kombu-4.6.11/kombu/__init__.py  2020-06-24 09:00:56.000000000 +0200
@@ -10,7 +10,7 @@
 
 from collections import namedtuple  # noqa
 
-__version__ = '4.6.10'
+__version__ = '4.6.11'
 __author__ = 'Ask Solem'
 __contact__ = '[email protected], [email protected]'
 __homepage__ = 'https://kombu.readthedocs.io'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kombu-4.6.10/kombu/connection.py 
new/kombu-4.6.11/kombu/connection.py
--- old/kombu-4.6.10/kombu/connection.py        2020-06-03 05:58:20.000000000 
+0200
+++ new/kombu-4.6.11/kombu/connection.py        2020-06-24 08:58:22.000000000 
+0200
@@ -279,8 +279,9 @@
 
     def connect(self):
         """Establish connection to server immediately."""
-        conn_opts = self._extract_failover_opts()
-        return self._ensure_connection(**conn_opts)
+        return self._ensure_connection(
+            max_retries=1, reraise_as_library_errors=False
+        )
 
     def channel(self):
         """Create and return a new channel."""
@@ -420,6 +421,9 @@
             timeout (int): Maximum amount of time in seconds to spend
                 waiting for connection
         """
+        if self.connected:
+            return self._connection
+
         def on_error(exc, intervals, retries, interval=0):
             round = self.completes_cycle(retries)
             if round:
@@ -434,13 +438,12 @@
         if not reraise_as_library_errors:
             ctx = self._dummy_context
         with ctx():
-            self._connection = self._connection or retry_over_time(
+            return retry_over_time(
                 self._connection_factory, self.recoverable_connection_errors,
                 (), {}, on_error, max_retries,
                 interval_start, interval_step, interval_max,
                 callback, timeout=timeout
             )
-            return self._connection
 
     @contextmanager
     def _reraise_as_library_errors(
@@ -860,16 +863,17 @@
         """
         if not self._closed:
             if not self.connected:
-                conn_opts = self._extract_failover_opts()
-                self._ensure_connection(**conn_opts)
+                return self._ensure_connection(
+                    max_retries=1, reraise_as_library_errors=False
+                )
             return self._connection
 
     def _connection_factory(self):
         self.declared_entities.clear()
         self._default_channel = None
-        connection = self._establish_connection()
+        self._connection = self._establish_connection()
         self._closed = False
-        return connection
+        return self._connection
 
     @property
     def default_channel(self):
@@ -883,6 +887,10 @@
             a connection is passed instead of a channel, to functions that
             require a channel.
         """
+        # make sure we're still connected, and if not refresh.
+        conn_opts = self._extract_failover_opts()
+        self._ensure_connection(**conn_opts)
+
         if self._default_channel is None:
             self._default_channel = self.channel()
         return self._default_channel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kombu-4.6.10/kombu.egg-info/PKG-INFO 
new/kombu-4.6.11/kombu.egg-info/PKG-INFO
--- old/kombu-4.6.10/kombu.egg-info/PKG-INFO    2020-06-03 06:36:35.000000000 
+0200
+++ new/kombu-4.6.11/kombu.egg-info/PKG-INFO    2020-06-24 09:10:23.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: kombu
-Version: 4.6.10
+Version: 4.6.11
 Summary: Messaging library for Python.
 Home-page: https://kombu.readthedocs.io
 Author: Ask Solem
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kombu-4.6.10/t/integration/common.py 
new/kombu-4.6.11/t/integration/common.py
--- old/kombu-4.6.10/t/integration/common.py    2020-06-01 09:12:48.000000000 
+0200
+++ new/kombu-4.6.11/t/integration/common.py    2020-06-24 08:58:22.000000000 
+0200
@@ -11,8 +11,52 @@
 class BasicFunctionality(object):
 
     def test_connect(self, connection):
+        assert connection.connect()
+        assert connection.connection
+        connection.close()
+        assert connection.connection is None
+        assert connection.connect()
+        assert connection.connection
+        connection.close()
+
+    def test_failed_connect(self, invalid_connection):
+        # method raises transport exception
+        with pytest.raises(Exception):
+            invalid_connection.connect()
+
+    def test_failed_connection(self, invalid_connection):
+        # method raises transport exception
+        with pytest.raises(Exception):
+            invalid_connection.connection
+
+    def test_failed_channel(self, invalid_connection):
+        # method raises transport exception
+        with pytest.raises(Exception):
+            invalid_connection.channel()
+
+    def test_failed_default_channel(self, invalid_connection):
+        invalid_connection.transport_options = {'max_retries': 1}
+        # method raises transport exception
+        with pytest.raises(Exception):
+            invalid_connection.default_channel
+
+    def test_default_channel_autoconnect(self, connection):
         connection.connect()
         connection.close()
+        assert connection.connection is None
+        assert connection.default_channel
+        assert connection.connection
+        connection.close()
+
+    def test_channel(self, connection):
+        chan = connection.channel()
+        assert chan
+        assert connection.connection
+
+    def test_default_channel(self, connection):
+        chan = connection.default_channel
+        assert chan
+        assert connection.connection
 
     def test_publish_consume(self, connection):
         test_queue = kombu.Queue('test', routing_key='test')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kombu-4.6.10/t/integration/test_py_amqp.py 
new/kombu-4.6.11/t/integration/test_py_amqp.py
--- old/kombu-4.6.10/t/integration/test_py_amqp.py      2020-06-01 
09:12:48.000000000 +0200
+++ new/kombu-4.6.11/t/integration/test_py_amqp.py      2020-06-24 
08:58:22.000000000 +0200
@@ -22,6 +22,11 @@
 
 
 @pytest.fixture()
+def invalid_connection():
+    return kombu.Connection('pyamqp://localhost:12345')
+
+
[email protected]()
 def connection(request):
     return get_connection(
         hostname=os.environ.get('RABBITMQ_HOST', 'localhost'),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kombu-4.6.10/t/integration/test_redis.py 
new/kombu-4.6.11/t/integration/test_redis.py
--- old/kombu-4.6.10/t/integration/test_redis.py        2020-05-17 
16:17:19.000000000 +0200
+++ new/kombu-4.6.11/t/integration/test_redis.py        2020-06-24 
08:58:22.000000000 +0200
@@ -6,7 +6,9 @@
 import kombu
 from time import sleep
 
-from .common import BasicFunctionality, BaseExchangeTypes, BasePriority
+from .common import (
+    BasicFunctionality, BaseExchangeTypes, BasePriority
+)
 
 
 def get_connection(
@@ -26,6 +28,11 @@
     )
 
 
[email protected]()
+def invalid_connection():
+    return kombu.Connection('redis://localhost:12345')
+
+
 @pytest.mark.env('redis')
 @pytest.mark.flaky(reruns=5, reruns_delay=2)
 class test_RedisBasicFunctionality(BasicFunctionality):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kombu-4.6.10/t/unit/test_connection.py 
new/kombu-4.6.11/t/unit/test_connection.py
--- old/kombu-4.6.10/t/unit/test_connection.py  2020-06-03 05:58:20.000000000 
+0200
+++ new/kombu-4.6.11/t/unit/test_connection.py  2020-06-24 08:58:22.000000000 
+0200
@@ -153,11 +153,15 @@
         conn._ensure_connection = Mock()
 
         conn.connect()
-        conn._ensure_connection.assert_called_with()
+        # ensure_connection must be called to return immidiately
+        # and fail with transport exception
+        conn._ensure_connection.assert_called_with(
+            max_retries=1, reraise_as_library_errors=False
+        )
 
     def test_connect_transport_options(self):
         conn = self.conn
-        conn.transport_options = options = {
+        conn.transport_options = {
             'max_retries': 1,
             'interval_start': 2,
             'interval_step': 3,
@@ -167,12 +171,12 @@
         conn._ensure_connection = Mock()
 
         conn.connect()
-        conn._ensure_connection.assert_called_with(**{
-            k: v for k, v in options.items()
-            if k in ['max_retries',
-                     'interval_start',
-                     'interval_step',
-                     'interval_max']})
+        # connect() is ignoring transport options
+        # ensure_connection must be called to return immidiately
+        # and fail with transport exception
+        conn._ensure_connection.assert_called_with(
+            max_retries=1, reraise_as_library_errors=False
+        )
 
     def test_multiple_urls(self):
         conn1 = Connection('amqp://foo;amqp://bar')
@@ -415,6 +419,18 @@
         conn._close()
         conn._default_channel.close.assert_called_with()
 
+    def test_auto_reconnect_default_channel(self):
+        # tests GH issue: #1208
+        # Tests that default_channel automatically reconnects when connection
+        # closed
+        c = Connection('memory://')
+        c._closed = True
+        with patch.object(
+            c, '_connection_factory', side_effect=c._connection_factory
+        ) as cf_mock:
+            c.default_channel
+            cf_mock.assert_called_once_with()
+
     def test_close_when_default_channel_close_raises(self):
 
         class Conn(Connection):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kombu-4.6.10/t/unit/transport/test_redis.py 
new/kombu-4.6.11/t/unit/transport/test_redis.py
--- old/kombu-4.6.10/t/unit/transport/test_redis.py     2020-06-01 
09:12:48.000000000 +0200
+++ new/kombu-4.6.11/t/unit/transport/test_redis.py     2020-06-24 
08:58:22.000000000 +0200
@@ -10,9 +10,7 @@
 from case import ANY, ContextMock, Mock, call, mock, skip, patch
 
 from kombu import Connection, Exchange, Queue, Consumer, Producer
-from kombu.exceptions import (
-    InconsistencyError, VersionMismatch, OperationalError
-)
+from kombu.exceptions import InconsistencyError, VersionMismatch
 from kombu.five import Empty, Queue as _Queue, bytes_if_py2
 from kombu.transport import virtual
 from kombu.utils import eventio  # patch poll
@@ -1045,11 +1043,10 @@
             assert conn.transport.channel_errors
 
     def test_check_at_least_we_try_to_connect_and_fail(self):
-        connection = Connection(
-            'redis://localhost:65534/', transport_options={'max_retries': 1}
-        )
+        import redis
+        connection = Connection('redis://localhost:65534/')
 
-        with pytest.raises(OperationalError):
+        with pytest.raises(redis.exceptions.ConnectionError):
             chan = connection.channel()
             chan._size('some_queue')
 
@@ -1468,12 +1465,13 @@
             master_for().connection_pool.get_connection.assert_called()
 
     def test_can_create_connection(self):
+        from redis.exceptions import ConnectionError
+
         connection = Connection(
             'sentinel://localhost:65534/',
             transport_options={
                 'master_name': 'not_important',
-                'max_retries': 1
             },
         )
-        with pytest.raises(OperationalError):
+        with pytest.raises(ConnectionError):
             connection.channel()


Reply via email to