Mailinglist Archive: opensuse-commit (1903 mails)

< Previous Next >
commit python-kombu for openSUSE:Factory
Hello community,

here is the log from the commit of package python-kombu for openSUSE:Factory
checked in at 2019-04-09 20:17:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-kombu (Old)
and /work/SRC/openSUSE:Factory/.python-kombu.new.3908 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-kombu"

Tue Apr 9 20:17:30 2019 rev:58 rq:691750 version:4.5.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-kombu/python-kombu.changes
2019-03-28 22:50:05.639038546 +0100
+++ /work/SRC/openSUSE:Factory/.python-kombu.new.3908/python-kombu.changes
2019-04-09 20:17:31.709715434 +0200
@@ -1,0 +2,12 @@
+Fri Apr 5 08:57:55 UTC 2019 - pgajdos@xxxxxxxx
+
+- version update to 4.5.0
+ - The Redis transport now supports a custom separator for keys.
+ - When the SQS server returns a timeout we ignore it and keep trying
+ instead of raising an error.
+ - Properly declare async support for the Qpid transport.
+ - Revert `celery/kombu#906 <https://github.com/celery/kombu/pull/906>`_ and
+ introduce unique broadcast queue names as an optional keyword argument.
+ - Codebase improvements and fixes
+
+-------------------------------------------------------------------

Old:
----
kombu-4.4.0.tar.gz

New:
----
kombu-4.5.0.tar.gz

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

Other differences:
------------------
++++++ python-kombu.spec ++++++
--- /var/tmp/diff_new_pack.YW95Ql/_old 2019-04-09 20:17:32.237716709 +0200
+++ /var/tmp/diff_new_pack.YW95Ql/_new 2019-04-09 20:17:32.237716709 +0200
@@ -18,7 +18,7 @@

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-kombu
-Version: 4.4.0
+Version: 4.5.0
Release: 0
Summary: AMQP Messaging Framework for Python
License: BSD-3-Clause

++++++ kombu-4.4.0.tar.gz -> kombu-4.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/Changelog new/kombu-4.5.0/Changelog
--- old/kombu-4.4.0/Changelog 2019-03-03 20:00:59.000000000 +0100
+++ new/kombu-4.5.0/Changelog 2019-03-31 17:17:05.000000000 +0200
@@ -4,7 +4,65 @@
Change history
================

-.. _version 4.4.0:
+.. _version-4.5.0:
+
+4.5.0
+=====
+:release-date: 2019-03-3 18:30 P.M UTC+3:00
+:release-by: Omer Katz
+
+- The Redis transport now supports a custom separator for keys.
+
+ Previously when storing a key in Redis which represents a queue
+ we used the hardcored value ``\x06\x16`` separator to store
+ different attributes of the queue in the queue's name.
+
+ The separator is now configurable using the sep
+ transport option:
+
+ .. code-block:: python
+
+ with Connection('redis://', transport_options={
+ 'sep': ':',
+ }):
+ # ...
+ pass
+
+ Contributed by **Joris Beckers**
+
+- When the SQS server returns a timeout we ignore it and keep trying
+ instead of raising an error.
+
+ This will prevent Celery from raising an error and hanging.
+
+ Contributed by **Erwin Rossen**
+
+- Properly declare async support for the Qpid transport.
+
+ If you are using this transport we strongly urge you to upgrade.
+
+ Contributed by **Rohan McGovern**
+
+- Revert `celery/kombu#906 <https://github.com/celery/kombu/pull/906>`_ and
+ introduce unique broadcast queue names as an optional keyword argument.
+
+ If you want each broadcast queue to have a unique name specify `unique=True`:
+
+ .. code-block:: pycon
+
+ >>> from kombu.common import Broadcast
+ >>> q = Broadcast(queue='foo', unique=True)
+ >>> q.name
+ 'foo.7ee1ac20-cda3-4966-aaf8-e7a3bb548688'
+ >>> q = Broadcast(queue='foo')
+ >>> q.name
+ 'foo'
+
+- Codebase improvements and fixes by:
+
+ - **Omer Katz**
+
+.. _version-4.4.0:

4.4.0
=====
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/PKG-INFO new/kombu-4.5.0/PKG-INFO
--- old/kombu-4.4.0/PKG-INFO 2019-03-03 20:03:19.000000000 +0100
+++ new/kombu-4.5.0/PKG-INFO 2019-03-31 17:18:38.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: kombu
-Version: 4.4.0
+Version: 4.5.0
Summary: Messaging library for Python.
Home-page: https://kombu.readthedocs.io
Author: Ask Solem
@@ -12,7 +12,7 @@

|build-status| |coverage| |license| |wheel| |pyversion| |pyimp|

- :Version: 4.4.0
+ :Version: 4.5.0
:Documentation: https://kombu.readthedocs.io/
:Download: https://pypi.org/project/kombu/
:Source: https://github.com/celery/kombu/
@@ -388,17 +388,17 @@
Classifier: Topic :: System :: Networking
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
-Provides-Extra: qpid
-Provides-Extra: azurestoragequeues
-Provides-Extra: sqlalchemy
-Provides-Extra: azureservicebus
-Provides-Extra: librabbitmq
-Provides-Extra: mongodb
-Provides-Extra: consul
+Provides-Extra: sqs
Provides-Extra: zookeeper
+Provides-Extra: sqlalchemy
+Provides-Extra: azurestoragequeues
Provides-Extra: redis
-Provides-Extra: pyro
+Provides-Extra: mongodb
Provides-Extra: yaml
+Provides-Extra: librabbitmq
Provides-Extra: slmq
-Provides-Extra: sqs
+Provides-Extra: pyro
+Provides-Extra: qpid
Provides-Extra: msgpack
+Provides-Extra: consul
+Provides-Extra: azureservicebus
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/README.rst new/kombu-4.5.0/README.rst
--- old/kombu-4.4.0/README.rst 2019-03-03 20:01:28.000000000 +0100
+++ new/kombu-4.5.0/README.rst 2019-03-31 17:18:06.000000000 +0200
@@ -4,7 +4,7 @@

|build-status| |coverage| |license| |wheel| |pyversion| |pyimp|

-:Version: 4.4.0
+:Version: 4.5.0
:Documentation: https://kombu.readthedocs.io/
:Download: https://pypi.org/project/kombu/
:Source: https://github.com/celery/kombu/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/docs/conf.py new/kombu-4.5.0/docs/conf.py
--- old/kombu-4.4.0/docs/conf.py 2019-02-25 12:28:52.000000000 +0100
+++ new/kombu-4.5.0/docs/conf.py 2019-03-31 17:17:45.000000000 +0200
@@ -6,8 +6,8 @@
globals().update(conf.build_config(
'kombu', __file__,
project='Kombu',
- version_dev='4.4',
- version_stable='4.3',
+ version_dev='4.6',
+ version_stable='4.5',
canonical_url='https://kombu.readthedocs.io/',
webdomain='kombu.readthedocs.io',
github_project='celery/kombu',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/docs/includes/introduction.txt
new/kombu-4.5.0/docs/includes/introduction.txt
--- old/kombu-4.4.0/docs/includes/introduction.txt 2019-03-03
20:01:28.000000000 +0100
+++ new/kombu-4.5.0/docs/includes/introduction.txt 2019-03-31
17:18:06.000000000 +0200
@@ -1,4 +1,4 @@
-:Version: 4.4.0
+:Version: 4.5.0
:Web: https://kombu.readthedocs.io/
:Download: https://pypi.org/project/kombu/
:Source: https://github.com/celery/kombu/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/extra/requirements/test-ci.txt
new/kombu-4.5.0/extra/requirements/test-ci.txt
--- old/kombu-4.4.0/extra/requirements/test-ci.txt 2019-01-14
10:52:30.000000000 +0100
+++ new/kombu-4.5.0/extra/requirements/test-ci.txt 2019-03-18
16:43:06.000000000 +0100
@@ -1,4 +1,5 @@
pytest-cov
+pytest-travis-fold
codecov
redis
PyYAML
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/kombu/__init__.py
new/kombu-4.5.0/kombu/__init__.py
--- old/kombu-4.4.0/kombu/__init__.py 2019-03-03 20:01:28.000000000 +0100
+++ new/kombu-4.5.0/kombu/__init__.py 2019-03-31 17:18:06.000000000 +0200
@@ -10,7 +10,7 @@

from collections import namedtuple # noqa

-__version__ = '4.4.0'
+__version__ = '4.5.0'
__author__ = 'Ask Solem'
__contact__ = 'ask@xxxxxxxxxxxxxxxxx'
__homepage__ = 'https://kombu.readthedocs.io'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/kombu/asynchronous/aws/connection.py
new/kombu-4.5.0/kombu/asynchronous/aws/connection.py
--- old/kombu-4.4.0/kombu/asynchronous/aws/connection.py 2019-01-08
10:50:50.000000000 +0100
+++ new/kombu-4.5.0/kombu/asynchronous/aws/connection.py 2019-03-27
14:05:13.000000000 +0100
@@ -21,7 +21,7 @@
return message_from_bytes(bs.encode())

except ImportError: # pragma: no cover
- from mimetools import Message as MIMEMessage # noqa
+ from mimetools import Message as MIMEMessage # noqa

# py2
def message_from_headers(hdr): # noqa
@@ -170,6 +170,14 @@
class AsyncAWSQueryConnection(AsyncConnection):
"""Async AWS Query Connection."""

+ STATUS_CODE_OK = 200
+ STATUS_CODE_REQUEST_TIMEOUT = 408
+ STATUS_CODE_NETWORK_CONNECT_TIMEOUT_ERROR = 599
+ STATUS_CODES_TIMEOUT = (
+ STATUS_CODE_REQUEST_TIMEOUT,
+ STATUS_CODE_NETWORK_CONNECT_TIMEOUT_ERROR
+ )
+
def __init__(self, sqs_connection, http_client=None,
http_client_params=None, **kwargs):
if not http_client_params:
@@ -224,17 +232,21 @@

def _on_list_ready(self, parent, markers, operation, response): # noqa
service_model = self.sqs_connection.meta.service_model
- if response.status == 200:
+ if response.status == self.STATUS_CODE_OK:
_, parsed = get_response(
service_model.operation_model(operation), response.response
)
return parsed
+ elif response.status in self.STATUS_CODES_TIMEOUT:
+ # When the server returns a timeout, the response is interpreted
+ # as an empty list. This prevents hanging the Celery worker.
+ return []
else:
raise self._for_status(response, response.read())

def _on_obj_ready(self, parent, operation, response): # noqa
service_model = self.sqs_connection.meta.service_model
- if response.status == 200:
+ if response.status == self.STATUS_CODE_OK:
_, parsed = get_response(
service_model.operation_model(operation), response.response
)
@@ -244,7 +256,7 @@

def _on_status_ready(self, parent, operation, response): # noqa
service_model = self.sqs_connection.meta.service_model
- if response.status == 200:
+ if response.status == self.STATUS_CODE_OK:
httpres, _ = get_response(
service_model.operation_model(operation), response.response
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/kombu/common.py
new/kombu-4.5.0/kombu/common.py
--- old/kombu-4.4.0/kombu/common.py 2019-01-08 16:16:19.000000000 +0100
+++ new/kombu-4.5.0/kombu/common.py 2019-03-31 16:41:52.000000000 +0200
@@ -79,15 +79,26 @@
queue (str): By default a unique id is used for the queue
name for every consumer. You can specify a custom
queue name here.
+ unique (bool): Always create a unique queue
+ even if a queue name is supplied.
**kwargs (Any): See :class:`~kombu.Queue` for a list
of additional keyword arguments supported.
"""

attrs = Queue.attrs + (('queue', None),)

- def __init__(self, name=None, queue=None, auto_delete=True,
- exchange=None, alias=None, **kwargs):
- queue = '{0}.{1}'.format(queue or 'bcast', uuid())
+ def __init__(self,
+ name=None,
+ queue=None,
+ unique=False,
+ auto_delete=True,
+ exchange=None,
+ alias=None,
+ **kwargs):
+ if unique:
+ queue = '{0}.{1}'.format(queue or 'bcast', uuid())
+ else:
+ queue = queue or 'bcast.{0}'.format(uuid())
return super(Broadcast, self).__init__(
alias=alias or name,
queue=queue,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/kombu/mixins.py
new/kombu-4.5.0/kombu/mixins.py
--- old/kombu-4.4.0/kombu/mixins.py 2019-01-08 10:50:50.000000000 +0100
+++ new/kombu-4.5.0/kombu/mixins.py 2019-03-18 16:43:06.000000000 +0100
@@ -21,7 +21,12 @@
__all__ = ('ConsumerMixin', 'ConsumerProducerMixin')

logger = get_logger(__name__)
-debug, info, warn, error = logger.debug, logger.info, logger.warn, logger.error
+debug, info, warn, error = (
+ logger.debug,
+ logger.info,
+ logger.warning,
+ logger.error
+)

W_CONN_LOST = """\
Connection to broker lost, trying to re-establish connection...\
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/kombu/transport/qpid.py
new/kombu-4.5.0/kombu/transport/qpid.py
--- old/kombu-4.4.0/kombu/transport/qpid.py 2019-01-08 10:50:50.000000000
+0100
+++ new/kombu-4.5.0/kombu/transport/qpid.py 2019-03-31 15:22:57.000000000
+0200
@@ -119,7 +119,7 @@
from kombu.five import Empty, items, monotonic, PY3
from kombu.log import get_logger
from kombu.transport.virtual import Base64, Message
-from kombu.transport import base
+from kombu.transport import base, virtual


logger = get_logger(__name__)
@@ -1406,7 +1406,9 @@
polling_interval = None

# This Transport does support the Celery asynchronous event model.
- supports_ev = True
+ implements = virtual.Transport.implements.extend(
+ asynchronous=True,
+ )

# The driver type and name for identification purposes.
driver_type = 'qpid'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/kombu/transport/redis.py
new/kombu-4.5.0/kombu/transport/redis.py
--- old/kombu-4.4.0/kombu/transport/redis.py 2019-02-25 12:28:52.000000000
+0100
+++ new/kombu-4.5.0/kombu/transport/redis.py 2019-03-18 16:43:06.000000000
+0100
@@ -464,7 +464,8 @@

from_transport_options = (
virtual.Channel.from_transport_options +
- ('ack_emulation',
+ ('sep',
+ 'ack_emulation',
'unacked_key',
'unacked_index_key',
'unacked_mutex_key',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/kombu/utils/url.py
new/kombu-4.5.0/kombu/utils/url.py
--- old/kombu-4.4.0/kombu/utils/url.py 2019-02-25 12:28:52.000000000 +0100
+++ new/kombu-4.5.0/kombu/utils/url.py 2019-03-18 16:43:06.000000000 +0100
@@ -53,7 +53,7 @@
query[key] = getattr(ssl, query[key])
else:
query[key] = None
- logger.warn('Defaulting to insecure SSL behaviour.')
+ logger.warning('Defaulting to insecure SSL behaviour.')

if 'ssl' not in query:
query['ssl'] = {}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/kombu.egg-info/PKG-INFO
new/kombu-4.5.0/kombu.egg-info/PKG-INFO
--- old/kombu-4.4.0/kombu.egg-info/PKG-INFO 2019-03-03 20:03:19.000000000
+0100
+++ new/kombu-4.5.0/kombu.egg-info/PKG-INFO 2019-03-31 17:18:38.000000000
+0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: kombu
-Version: 4.4.0
+Version: 4.5.0
Summary: Messaging library for Python.
Home-page: https://kombu.readthedocs.io
Author: Ask Solem
@@ -12,7 +12,7 @@

|build-status| |coverage| |license| |wheel| |pyversion| |pyimp|

- :Version: 4.4.0
+ :Version: 4.5.0
:Documentation: https://kombu.readthedocs.io/
:Download: https://pypi.org/project/kombu/
:Source: https://github.com/celery/kombu/
@@ -388,17 +388,17 @@
Classifier: Topic :: System :: Networking
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
-Provides-Extra: qpid
-Provides-Extra: azurestoragequeues
-Provides-Extra: sqlalchemy
-Provides-Extra: azureservicebus
-Provides-Extra: librabbitmq
-Provides-Extra: mongodb
-Provides-Extra: consul
+Provides-Extra: sqs
Provides-Extra: zookeeper
+Provides-Extra: sqlalchemy
+Provides-Extra: azurestoragequeues
Provides-Extra: redis
-Provides-Extra: pyro
+Provides-Extra: mongodb
Provides-Extra: yaml
+Provides-Extra: librabbitmq
Provides-Extra: slmq
-Provides-Extra: sqs
+Provides-Extra: pyro
+Provides-Extra: qpid
Provides-Extra: msgpack
+Provides-Extra: consul
+Provides-Extra: azureservicebus
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/requirements/test-ci.txt
new/kombu-4.5.0/requirements/test-ci.txt
--- old/kombu-4.4.0/requirements/test-ci.txt 2019-01-14 10:52:30.000000000
+0100
+++ new/kombu-4.5.0/requirements/test-ci.txt 2019-03-18 16:43:06.000000000
+0100
@@ -1,4 +1,5 @@
pytest-cov
+pytest-travis-fold
codecov
redis
PyYAML
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/t/unit/test_common.py
new/kombu-4.5.0/t/unit/test_common.py
--- old/kombu-4.4.0/t/unit/test_common.py 2019-01-08 10:50:50.000000000
+0100
+++ new/kombu-4.5.0/t/unit/test_common.py 2019-03-31 16:41:52.000000000
+0200
@@ -72,19 +72,33 @@
class test_Broadcast:

def test_arguments(self):
- q = Broadcast(name='test_Broadcast')
- assert q.name.startswith('bcast.')
- assert q.alias == 'test_Broadcast'
- assert q.auto_delete
- assert q.exchange.name == 'test_Broadcast'
- assert q.exchange.type == 'fanout'
+ with patch('kombu.common.uuid',
+ return_value='test') as uuid_mock:
+ q = Broadcast(name='test_Broadcast')
+ uuid_mock.assert_called_with()
+ assert q.name == 'bcast.test'
+ assert q.alias == 'test_Broadcast'
+ assert q.auto_delete
+ assert q.exchange.name == 'test_Broadcast'
+ assert q.exchange.type == 'fanout'

q = Broadcast('test_Broadcast', 'explicit_queue_name')
- assert q.name.startswith('explicit_queue_name.')
+ assert q.name == 'explicit_queue_name'
assert q.exchange.name == 'test_Broadcast'

q2 = q(Mock())
- assert q2.name.split('.')[0] == q.name.split('.')[0]
+ assert q2.name == q.name
+
+ with patch('kombu.common.uuid',
+ return_value='test') as uuid_mock:
+ q = Broadcast('test_Broadcast',
+ 'explicit_queue_name',
+ unique=True)
+ uuid_mock.assert_called_with()
+ assert q.name == 'explicit_queue_name.test'
+
+ q2 = q(Mock())
+ assert q2.name.split('.')[0] == q.name.split('.')[0]


class test_maybe_declare:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/t/unit/transport/test_qpid.py
new/kombu-4.5.0/t/unit/transport/test_qpid.py
--- old/kombu-4.4.0/t/unit/transport/test_qpid.py 2019-02-25
12:28:52.000000000 +0100
+++ new/kombu-4.5.0/t/unit/transport/test_qpid.py 2019-03-31
15:22:57.000000000 +0200
@@ -1663,9 +1663,6 @@
def test_verify_polling_disabled(self):
assert Transport.polling_interval is None

- def test_transport_verify_supports_asynchronous_events(self):
- assert Transport.supports_ev
-
def test_verify_driver_type_and_name(self):
assert Transport.driver_type == 'qpid'
assert Transport.driver_name == 'qpid'
@@ -1819,6 +1816,10 @@
"""Creates a mock_client to be used in testing."""
self.mock_client = Mock()

+ def test_supports_ev(self):
+ """Test that the transport claims to support async event loop"""
+ assert Transport(self.mock_client).supports_ev
+
def test_close_connection(self):
"""Test that close_connection calls close on the connection."""
my_transport = Transport(self.mock_client)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/kombu-4.4.0/t/unit/transport/test_redis.py
new/kombu-4.5.0/t/unit/transport/test_redis.py
--- old/kombu-4.4.0/t/unit/transport/test_redis.py 2019-02-25
12:28:52.000000000 +0100
+++ new/kombu-4.5.0/t/unit/transport/test_redis.py 2019-03-18
16:43:06.000000000 +0100
@@ -835,6 +835,18 @@
redis.redis.SSLConnection,
)

+ def test_sep_transport_option(self):
+ with Connection(transport=Transport, transport_options={
+ 'sep': ':',
+ }) as conn:
+ key = conn.default_channel.keyprefix_queue % 'celery'
+ conn.default_channel.client.sadd(key, 'celery::celery')
+
+ assert conn.default_channel.sep == ':'
+ assert conn.default_channel.get_table('celery') == [
+ ('celery', '', 'celery'),
+ ]
+

@skip.unless_module('redis')
class test_Redis:


< Previous Next >
This Thread