Hello community, here is the log from the commit of package python-pika for openSUSE:Factory checked in at 2019-04-19 18:39:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pika (Old) and /work/SRC/openSUSE:Factory/.python-pika.new.5536 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pika" Fri Apr 19 18:39:06 2019 rev:13 rq:695707 version:1.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pika/python-pika.changes 2019-04-08 20:53:50.350581703 +0200 +++ /work/SRC/openSUSE:Factory/.python-pika.new.5536/python-pika.changes 2019-04-19 18:39:29.671269412 +0200 @@ -1,0 +2,7 @@ +Thu Apr 18 12:56:39 UTC 2019 - Ondřej Súkup <[email protected]> + +- update to 1.0.1 + * API docstring updates + * Twisted adapter: Add basic_consume Deferred to the call list + +------------------------------------------------------------------- Old: ---- 1.0.0.tar.gz New: ---- 1.0.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pika.spec ++++++ --- /var/tmp/diff_new_pack.vn2TLF/_old 2019-04-19 18:39:31.291271470 +0200 +++ /var/tmp/diff_new_pack.vn2TLF/_new 2019-04-19 18:39:31.307271490 +0200 @@ -19,7 +19,7 @@ %define mod_name pika %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-%{mod_name} -Version: 1.0.0 +Version: 1.0.1 Release: 0 Summary: Pika Python AMQP Client Library License: BSD-3-Clause ++++++ 1.0.0.tar.gz -> 1.0.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-1.0.0/CHANGELOG.rst new/pika-1.0.1/CHANGELOG.rst --- old/pika-1.0.0/CHANGELOG.rst 2019-03-27 01:39:32.000000000 +0100 +++ new/pika-1.0.1/CHANGELOG.rst 2019-04-12 19:45:56.000000000 +0200 @@ -1,6 +1,14 @@ Version History =============== +1.0.1 2019-04-12 +---------------- + +`GitHub milestone <https://github.com/pika/pika/milestone/15?closed=1>`_ + +- API docstring updates +- Twisted adapter: Add basic_consume Deferred to the call list (`PR <https://github.com/pika/pika/pull/1202>`_) + 1.0.0 2019-03-26 ---------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-1.0.0/docs/examples/twisted_example.rst new/pika-1.0.1/docs/examples/twisted_example.rst --- old/pika-1.0.0/docs/examples/twisted_example.rst 2019-03-27 01:39:32.000000000 +0100 +++ new/pika-1.0.1/docs/examples/twisted_example.rst 2019-04-12 19:45:56.000000000 +0200 @@ -1,49 +1,5 @@ Twisted Consumer Example ======================== -Example of writing a consumer using the :py:class:`Twisted connection adapter <pika.adapters.twisted_connection.TwistedProtocolConnection>`:: +Example of writing an application using the :py:class:`Twisted connection adapter <pika.adapters.twisted_connection.TwistedProtocolConnection>`::. - # -*- coding:utf-8 -*- - - import pika - from pika import exceptions - from pika.adapters import twisted_connection - from twisted.internet import defer, reactor, protocol,task - - - @defer.inlineCallbacks - def run(connection): - - channel = yield connection.channel() - - exchange = yield channel.exchange_declare(exchange='topic_link', exchange_type='topic') - - queue = yield channel.queue_declare(queue='hello', auto_delete=False, exclusive=False) - - yield channel.queue_bind(exchange='topic_link',queue='hello',routing_key='hello.world') - - yield channel.basic_qos(prefetch_count=1) - - queue_object, consumer_tag = yield channel.basic_consume('hello', auto_ack=False) - - l = task.LoopingCall(read, queue_object) - - l.start(0.01) - - - @defer.inlineCallbacks - def read(queue_object): - - ch,method,properties,body = yield queue_object.get() - - if body: - print(body) - - yield ch.basic_ack(delivery_tag=method.delivery_tag) - - - parameters = pika.ConnectionParameters() - cc = protocol.ClientCreator(reactor, twisted_connection.TwistedProtocolConnection, parameters) - d = cc.connectTCP('hostname', 5672) - d.addCallback(lambda protocol: protocol.ready) - d.addCallback(run) - reactor.run() +`Twisted Example <https://github.com/pika/pika/blob/master/examples/twisted_service.py>`_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-1.0.0/docs/faq.rst new/pika-1.0.1/docs/faq.rst --- old/pika-1.0.0/docs/faq.rst 2019-03-27 01:39:32.000000000 +0100 +++ new/pika-1.0.1/docs/faq.rst 2019-04-12 19:45:56.000000000 +0200 @@ -15,4 +15,4 @@ - How can I contribute to Pika? - You can `fork the project on Github <http://help.github.com/forking/>`_ and issue `Pull Requests <http://help.github.com/pull-requests/>`_ when you believe you have something solid to be added to the main repository. + You can `fork the project on Github <https://help.github.com/en/articles/fork-a-repo/>`_ and issue `Pull Requests <https://help.github.com/en/articles/about-pull-requests/>`_ when you believe you have something solid to be added to the main repository. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-1.0.0/docs/intro.rst new/pika-1.0.1/docs/intro.rst --- old/pika-1.0.0/docs/intro.rst 2019-03-27 01:39:32.000000000 +0100 +++ new/pika-1.0.1/docs/intro.rst 2019-04-12 19:45:56.000000000 +0200 @@ -122,4 +122,4 @@ .. rubric:: Footnotes -.. [#f1] "more effective flow control mechanism that does not require cooperation from clients and reacts quickly to prevent the broker from exhausting memory - see http://www.rabbitmq.com/extensions.html#memsup" from http://lists.rabbitmq.com/pipermail/rabbitmq-announce/attachments/20100825/2c672695/attachment.txt +.. [#f1] "more effective flow control mechanism that does not require cooperation from clients and reacts quickly to prevent the broker from exhausting memory - see http://lists.rabbitmq.com/pipermail/rabbitmq-announce/attachments/20100825/2c672695/attachment.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-1.0.0/docs/version_history.rst new/pika-1.0.1/docs/version_history.rst --- old/pika-1.0.0/docs/version_history.rst 2019-03-27 01:39:32.000000000 +0100 +++ new/pika-1.0.1/docs/version_history.rst 2019-04-12 19:45:56.000000000 +0200 @@ -1,6 +1,14 @@ Version History =============== +1.0.1 2019-04-12 +---------------- + +`GitHub milestone <https://github.com/pika/pika/milestone/15?closed=1>`_ + +- API docstring updates +- Twisted adapter: Add basic_consume Deferred to the call list (`PR <https://github.com/pika/pika/pull/1202>`_) + 1.0.0 2019-03-26 ---------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-1.0.0/examples/twisted_service.py new/pika-1.0.1/examples/twisted_service.py --- old/pika-1.0.0/examples/twisted_service.py 2019-03-27 01:39:32.000000000 +0100 +++ new/pika-1.0.1/examples/twisted_service.py 2019-04-12 19:45:56.000000000 +0200 @@ -67,13 +67,13 @@ host=self.parameters.host, port=self.parameters.port, factory=f) + serv.factory = f f.service = serv # pylint: disable=W0201 name = '%s%s:%d' % ('ssl:' if self.parameters.ssl_options else '', self.parameters.host, self.parameters.port) serv.__repr__ = lambda: '<AMQP Connection to %s>' % name serv.setName(name) - serv.parent = self - self.addService(serv) + serv.setServiceParent(self) class PikaProtocol(twisted_connection.TwistedProtocolConnection): @@ -85,11 +85,11 @@ self.factory = factory @inlineCallbacks - def onConnected(self, connection): - self.channel = yield connection.channel() - yield self.channel.basic_qos(prefetch_count=PREFETCH_COUNT) + def connectionReady(self): + self._channel = yield self.channel() + yield self._channel.basic_qos(prefetch_count=PREFETCH_COUNT) self.connected = True - yield self.channel.confirm_delivery() + yield self._channel.confirm_delivery() for ( exchange, routing_key, @@ -109,22 +109,22 @@ def setup_read(self, exchange, routing_key, callback): """This function does the work to read from an exchange.""" if exchange: - yield self.channel.exchange_declare( + yield self._channel.exchange_declare( exchange=exchange, exchange_type='topic', durable=True, auto_delete=False) - yield self.channel.queue_declare(queue=routing_key, durable=True) + yield self._channel.queue_declare(queue=routing_key, durable=True) if exchange: - yield self.channel.queue_bind(queue=routing_key, exchange=exchange) - yield self.channel.queue_bind( + yield self._channel.queue_bind(queue=routing_key, exchange=exchange) + yield self._channel.queue_bind( queue=routing_key, exchange=exchange, routing_key=routing_key) ( queue, _consumer_tag, - ) = yield self.channel.basic_consume( + ) = yield self._channel.basic_consume( queue=routing_key, auto_ack=False) d = queue.get() d.addCallback(self._read_item, queue, callback) @@ -170,14 +170,14 @@ log.msg( '%s (%s): %s' % (exchange, routing_key, repr(msg)), system='Pika:=>') - yield self.channel.exchange_declare( + yield self._channel.exchange_declare( exchange=exchange, exchange_type='topic', durable=True, auto_delete=False) prop = spec.BasicProperties(delivery_mode=2) try: - yield self.channel.basic_publish( + yield self._channel.basic_publish( exchange=exchange, routing_key=routing_key, body=msg, @@ -202,7 +202,6 @@ self.resetDelay() log.msg('Connected', system=self.name) self.client = PikaProtocol(self, self.parameters) - self.client.ready.addCallback(self.client.onConnected) return self.client def clientConnectionLost(self, connector, reason): # pylint: disable=W0221 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-1.0.0/pika/__init__.py new/pika-1.0.1/pika/__init__.py --- old/pika-1.0.0/pika/__init__.py 2019-03-27 01:39:32.000000000 +0100 +++ new/pika-1.0.1/pika/__init__.py 2019-04-12 19:45:56.000000000 +0200 @@ -1,4 +1,4 @@ -__version__ = '1.0.0' +__version__ = '1.0.1' import logging diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-1.0.0/pika/adapters/blocking_connection.py new/pika-1.0.1/pika/adapters/blocking_connection.py --- old/pika-1.0.0/pika/adapters/blocking_connection.py 2019-03-27 01:39:32.000000000 +0100 +++ new/pika-1.0.1/pika/adapters/blocking_connection.py 2019-04-12 19:45:56.000000000 +0200 @@ -2310,7 +2310,7 @@ """Turn on RabbitMQ-proprietary Confirm mode in the channel. For more information see: - http://www.rabbitmq.com/extensions.html#confirms + https://www.rabbitmq.com/confirms.html """ if self._delivery_confirmation: LOGGER.error( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-1.0.0/pika/adapters/twisted_connection.py new/pika-1.0.1/pika/adapters/twisted_connection.py --- old/pika-1.0.0/pika/adapters/twisted_connection.py 2019-03-27 01:39:32.000000000 +0100 +++ new/pika-1.0.1/pika/adapters/twisted_connection.py 2019-04-12 19:45:56.000000000 +0200 @@ -390,11 +390,12 @@ :param str consumer_tag: Specify your own consumer tag :param dict arguments: Custom key/value pair arguments for the consumer :returns: Deferred that fires with a tuple - ``(queue_object, consumer_tag)``. The queue object is an instance - of :class:`ClosableDeferredQueue`, where data received from - the queue will be stored. Clients should use its - :meth:`get() <ClosableDeferredQueue.get>` method to fetch an - individual message, which will return a Deferred firing with a + ``(queue_object, consumer_tag)``. The Deferred will errback with an + instance of :class:`exceptions.ChannelClosed` if the call fails. + The queue object is an instance of :class:`ClosableDeferredQueue`, + where data received from the queue will be stored. Clients should + use its :meth:`get() <ClosableDeferredQueue.get>` method to fetch + an individual message, which will return a Deferred firing with a namedtuple whose attributes are: - channel: this TwistedChannel - method: pika.spec.Basic.Deliver @@ -408,12 +409,14 @@ queue_obj = ClosableDeferredQueue() d = defer.Deferred() + self._calls.add(d) def on_consume_ok(frame): consumer_tag = frame.method.consumer_tag self._queue_name_to_consumer_tags.setdefault( queue, set()).add(consumer_tag) self._consumers[consumer_tag] = queue_obj + self._calls.discard(d) d.callback((queue_obj, consumer_tag)) def on_message_callback(_channel, method, properties, body): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-1.0.0/pika/channel.py new/pika-1.0.1/pika/channel.py --- old/pika-1.0.0/pika/channel.py 2019-03-27 01:39:32.000000000 +0100 +++ new/pika-1.0.1/pika/channel.py 2019-04-12 19:45:56.000000000 +0200 @@ -214,9 +214,9 @@ the loss of consumers due to events such as queue deletion. :param str consumer_tag: Identifier for the consumer - :param callable callback: Callback to call for a Basic.CancelOk - response. If None, do not expect a Basic.CancelOk response, - otherwise, callback must be callable. + :param callable callback: callback(pika.frame.Method) for method + Basic.CancelOk. If None, do not expect a Basic.CancelOk response, + otherwise, callback must be callable :raises ValueError: @@ -254,12 +254,11 @@ self._cancelled.add(consumer_tag) - self._rpc( - spec.Basic.Cancel(consumer_tag=consumer_tag, nowait=nowait), - self._on_cancelok if not nowait else None, - [(spec.Basic.CancelOk, { - 'consumer_tag': consumer_tag - })] if not nowait else []) + self._rpc(spec.Basic.Cancel(consumer_tag=consumer_tag, nowait=nowait), + self._on_cancelok if not nowait else None, + [(spec.Basic.CancelOk, { + 'consumer_tag': consumer_tag + })] if not nowait else []) def basic_consume(self, queue, @@ -322,12 +321,11 @@ rpc_callback = self._on_eventok if callback is None else callback self._rpc( - spec.Basic.Consume( - queue=queue, - consumer_tag=consumer_tag, - no_ack=auto_ack, - exclusive=exclusive, - arguments=arguments or dict()), rpc_callback, + spec.Basic.Consume(queue=queue, + consumer_tag=consumer_tag, + no_ack=auto_ack, + exclusive=exclusive, + arguments=arguments or dict()), rpc_callback, [(spec.Basic.ConsumeOk, { 'consumer_tag': consumer_tag })]) @@ -426,9 +424,9 @@ body = body.encode('utf-8') properties = properties or spec.BasicProperties() self._send_method( - spec.Basic.Publish( - exchange=exchange, routing_key=routing_key, - mandatory=mandatory), (properties, body)) + spec.Basic.Publish(exchange=exchange, + routing_key=routing_key, + mandatory=mandatory), (properties, body)) def basic_qos(self, prefetch_size=0, @@ -502,13 +500,15 @@ delivering it to an alternative subscriber. :param callable callback: Callback to call when receiving Basic.RecoverOk + :param callable callback: callback(pika.frame.Method) for method + Basic.RecoverOk :raises ValueError: """ self._raise_if_not_open() validators.rpc_completion_callback(callback) - return self._rpc( - spec.Basic.Recover(requeue), callback, [spec.Basic.RecoverOk]) + return self._rpc(spec.Basic.Recover(requeue), callback, + [spec.Basic.RecoverOk]) def close(self, reply_code=0, reply_text="Normal shutdown"): """Invoke a graceful shutdown of the channel with the AMQP Broker. @@ -547,9 +547,8 @@ # ChannelWrongStateError exception from basic_cancel self._set_state(self.CLOSING) - self._rpc( - spec.Channel.Close(reply_code, reply_text, 0, 0), self._on_closeok, - [spec.Channel.CloseOk]) + self._rpc(spec.Channel.Close(reply_code, reply_text, 0, 0), + self._on_closeok, [spec.Channel.CloseOk]) def confirm_delivery(self, ack_nack_callback, callback=None): """Turn on Confirm mode in the channel. Pass in a callback to be @@ -557,13 +556,13 @@ rejected (Basic.Ack, Basic.Nack) from the broker to the publisher. For more information see: - http://www.rabbitmq.com/extensions.html#confirms + https://www.rabbitmq.com/confirms.html :param callable ack_nack_callback: Required callback for delivery confirmations that has the following signature: callback(pika.frame.Method), where method_frame contains either method `spec.Basic.Ack` or `spec.Basic.Nack`. - :param callable callback: Callback to call when receiving + :param callable callback: callback(pika.frame.Method) for method Confirm.SelectOk :raises ValueError: @@ -588,9 +587,8 @@ self.callbacks.add(self.channel_number, spec.Basic.Nack, ack_nack_callback, False) - self._rpc( - spec.Confirm.Select(nowait), callback, - [spec.Confirm.SelectOk] if not nowait else []) + self._rpc(spec.Confirm.Select(nowait), callback, + [spec.Confirm.SelectOk] if not nowait else []) @property def consumer_tags(self): @@ -613,7 +611,7 @@ :param str source: The source exchange to bind to :param str routing_key: The routing key to bind on :param dict arguments: Custom key/value pair arguments for the binding - :param callable callback: The callback to call on Exchange.BindOk + :param callable callback: callback(pika.frame.Method) for method Exchange.BindOk :raises ValueError: """ @@ -653,7 +651,7 @@ :param bool auto_delete: Remove when no more queues are bound to it :param bool internal: Can only be published to by other exchanges :param dict arguments: Custom key/value pair arguments for the exchange - :param callable callback: Call this method on Exchange.DeclareOk + :param callable callback: callback(pika.frame.Method) for method Exchange.DeclareOk :raises ValueError: """ @@ -671,15 +669,15 @@ :param str exchange: The exchange name :param bool if_unused: only delete if the exchange is unused - :param callable callback: The function to call on Exchange.DeleteOk + :param callable callback: callback(pika.frame.Method) for method Exchange.DeleteOk :raises ValueError: """ self._raise_if_not_open() nowait = validators.rpc_completion_callback(callback) - return self._rpc( - spec.Exchange.Delete(0, exchange, if_unused, nowait), callback, - [spec.Exchange.DeleteOk] if not nowait else []) + return self._rpc(spec.Exchange.Delete(0, exchange, if_unused, + nowait), callback, + [spec.Exchange.DeleteOk] if not nowait else []) def exchange_unbind(self, destination=None, @@ -693,7 +691,7 @@ :param str source: The source exchange to unbind from :param str routing_key: The routing key to unbind :param dict arguments: Custom key/value pair arguments for the binding - :param callable callback: The callback to call on Exchange.UnbindOk + :param callable callback: callback(pika.frame.Method) for method Exchange.UnbindOk :raises ValueError: """ @@ -713,16 +711,15 @@ http://www.rabbitmq.com/amqp-0-9-1-reference.html#channel.flow :param bool active: Turn flow on or off - :param callable callback: The optional callback to call upon - completion + :param callable callback: callback(bool) upon completion :raises ValueError: """ self._raise_if_not_open() validators.rpc_completion_callback(callback) self._on_flowok_callback = callback - self._rpc( - spec.Channel.Flow(active), self._on_flowok, [spec.Channel.FlowOk]) + self._rpc(spec.Channel.Flow(active), self._on_flowok, + [spec.Channel.FlowOk]) @property def is_closed(self): @@ -770,7 +767,7 @@ :param str exchange: The source exchange to bind to :param str routing_key: The routing key to bind on :param dict arguments: Custom key/value pair arguments for the binding - :param callable callback: The callback to call on Queue.BindOk + :param callable callback: callback(pika.frame.Method) for method Queue.BindOk :raises ValueError: """ @@ -808,8 +805,7 @@ :param bool exclusive: Only allow access by the current connection :param bool auto_delete: Delete after consumer cancels or disconnects :param dict arguments: Custom key/value arguments for the queue - :param callable callback: callback(pika.frame.Method) for method - Queue.DeclareOk + :param callable callback: callback(pika.frame.Method) for method Queue.DeclareOk :raises ValueError: """ @@ -838,7 +834,7 @@ :param str queue: The queue to delete :param bool if_unused: only delete if it's unused :param bool if_empty: only delete if the queue is empty - :param callable callback: The callback to call on Queue.DeleteOk + :param callable callback: callback(pika.frame.Method) for method Queue.DeleteOk :raises ValueError: """ @@ -854,7 +850,7 @@ """Purge all of the messages from the specified queue :param str queue: The queue to purge - :param callable callback: The callback to call on Queue.PurgeOk + :param callable callback: callback(pika.frame.Method) for method Queue.PurgeOk :raises ValueError: """ @@ -876,7 +872,7 @@ :param str exchange: The source exchange to bind from :param str routing_key: The routing key to unbind :param dict arguments: Custom key/value pair arguments for the binding - :param callable callback: The callback to call on Queue.UnbindOk + :param callable callback: callback(pika.frame.Method) for method Queue.UnbindOk :raises ValueError: """ @@ -957,12 +953,11 @@ signature: callback(channel) """ - self.callbacks.add( - self.channel_number, - self._ON_CHANNEL_CLEANUP_CB_KEY, - callback, - one_shot=True, - only_caller=self) + self.callbacks.add(self.channel_number, + self._ON_CHANNEL_CLEANUP_CB_KEY, + callback, + one_shot=True, + only_caller=self) def _cleanup(self): """Remove all consumers and any callbacks for the channel.""" @@ -1363,18 +1358,16 @@ else: arguments = None LOGGER.debug('Adding on_synchronous_complete callback') - self.callbacks.add( - self.channel_number, - reply, - self._on_synchronous_complete, - arguments=arguments) + self.callbacks.add(self.channel_number, + reply, + self._on_synchronous_complete, + arguments=arguments) if callback is not None: LOGGER.debug('Adding passed-in RPC response callback') - self.callbacks.add( - self.channel_number, - reply, - callback, - arguments=arguments) + self.callbacks.add(self.channel_number, + reply, + callback, + arguments=arguments) def _raise_if_not_open(self): """If channel is not in the OPEN state, raises ChannelWrongStateError diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-1.0.0/pika/connection.py new/pika-1.0.1/pika/connection.py --- old/pika-1.0.0/pika/connection.py 2019-03-27 01:39:32.000000000 +0100 +++ new/pika-1.0.1/pika/connection.py 2019-04-12 19:45:56.000000000 +0200 @@ -571,7 +571,7 @@ :param pika.credentials.Credentials credentials: auth credentials :param int channel_max: Maximum number of channels to allow :param int frame_max: The maximum byte size for an AMQP frame - :param int|None|callable value: Controls AMQP heartbeat timeout negotiation + :param int|None|callable heartbeat: Controls AMQP heartbeat timeout negotiation during connection tuning. An integer value always overrides the value proposed by broker. Use 0 to deactivate heartbeats and None to always accept the broker's proposal. If a callable is given, it will be called diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-1.0.0/setup.py new/pika-1.0.1/setup.py --- old/pika-1.0.0/setup.py 2019-03-27 01:39:32.000000000 +0100 +++ new/pika-1.0.1/setup.py 2019-04-12 19:45:56.000000000 +0200 @@ -16,7 +16,7 @@ setuptools.setup( name='pika', - version='1.0.0', + version='1.0.1', description='Pika Python AMQP Client Library', long_description=open('README.rst').read(), maintainer='Gavin M. Roy', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-1.0.0/tests/acceptance/twisted_adapter_tests.py new/pika-1.0.1/tests/acceptance/twisted_adapter_tests.py --- old/pika-1.0.0/tests/acceptance/twisted_adapter_tests.py 2019-03-27 01:39:32.000000000 +0100 +++ new/pika-1.0.1/tests/acceptance/twisted_adapter_tests.py 2019-04-12 19:45:56.000000000 +0200 @@ -24,7 +24,7 @@ from pika import spec from pika.exceptions import ( AMQPConnectionError, ConsumerCancelled, DuplicateGetOkCallback, NackError, - UnroutableError) + UnroutableError, ChannelClosedByBroker) from pika.frame import Method @@ -186,6 +186,14 @@ d = self.channel.basic_consume(queue="testqueue") return self.assertFailure(d, RuntimeError) + def test_basic_consume_errback_on_close(self): + # Verify Deferreds that haven't had their callback invoked errback when + # the channel closes. + d = self.channel.basic_consume(queue="testqueue") + self.channel._on_channel_closed( + self, ChannelClosedByBroker(404, "NOT FOUND")) + return self.assertFailure(d, ChannelClosedByBroker) + @deferred(timeout=5.0) def test_queue_delete(self): # Verify that the consumers are cleared when a queue is deleted.
