From 3c995b82a5565a1da10e924cbd994120f0858cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= Date: Thu, 9 Jul 2020 18:32:39 +0200 Subject: [PATCH 1/7] version bump --- CHANGELOG.md | 4 +--- coolamqp/__init__.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f83f607..927d3e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,6 @@ The changelog is kept as [release notes](https://github.com/smok-serwis/coolamqp on GitHub. This file serves to only note what changes have been made so far, between releases. -# v1.2.6 +# v1.2.7 -* repr improved for methods that were received from the server and had memoryview's in them -* is far more friendly on Windows, which doesn't have epoll diff --git a/coolamqp/__init__.py b/coolamqp/__init__.py index 593fb6f..b428709 100644 --- a/coolamqp/__init__.py +++ b/coolamqp/__init__.py @@ -1 +1 @@ -__version__ = '1.2.6' +__version__ = '1.2.7_a1' From ed82bec196700ace2c71b41690165caeb2cb296b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= Date: Thu, 9 Jul 2020 18:34:04 +0200 Subject: [PATCH 2/7] don't include setup.py in coverage --- .coveragerc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.coveragerc b/.coveragerc index e07fda6..43c16e6 100644 --- a/.coveragerc +++ b/.coveragerc @@ -7,3 +7,5 @@ omit= stress_tests/* coolamqp/framing/definitions.py compile_definitions/* + setup.py + From e6ed251301e72a5129bc4eb2e08403c0bb6bb3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= Date: Thu, 9 Jul 2020 18:42:12 +0200 Subject: [PATCH 3/7] update docs --- docs/coolamqp/cluster.rst | 5 +++++ docs/index.rst | 1 + 2 files changed, 6 insertions(+) create mode 100644 docs/coolamqp/cluster.rst diff --git a/docs/coolamqp/cluster.rst b/docs/coolamqp/cluster.rst new file mode 100644 index 0000000..73af6b0 --- /dev/null +++ b/docs/coolamqp/cluster.rst @@ -0,0 +1,5 @@ +CoolAMQP cluster +================ + +.. autoclass:: coolamqp.clustering.Cluster + :members: diff --git a/docs/index.rst b/docs/index.rst index 8c37645..0a6c28a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -5,6 +5,7 @@ Welcome to CoolAMQP's documentation! :maxdepth: 2 :caption: Contents + coolamqp/cluster tutorial caveats frames From b8f67d2870340fa6d0fa81187cf85110a52bb9d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= Date: Thu, 9 Jul 2020 18:53:55 +0200 Subject: [PATCH 4/7] v1.2.7 --- CHANGELOG.md | 2 +- coolamqp/__init__.py | 2 +- coolamqp/attaches/consumer.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 927d3e7..55eef87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,4 +4,4 @@ have been made so far, between releases. # v1.2.7 - +* fixed queue being defined as a different one in consumer if it was anonymous diff --git a/coolamqp/__init__.py b/coolamqp/__init__.py index b428709..af391e6 100644 --- a/coolamqp/__init__.py +++ b/coolamqp/__init__.py @@ -1 +1 @@ -__version__ = '1.2.7_a1' +__version__ = '1.2.7' diff --git a/coolamqp/attaches/consumer.py b/coolamqp/attaches/consumer.py index 24214ac..a18e089 100644 --- a/coolamqp/attaches/consumer.py +++ b/coolamqp/attaches/consumer.py @@ -384,7 +384,7 @@ def on_setup(self, payload): # type: (coolamqp.framing.base.AMQPMethodPayload) elif isinstance(payload, ExchangeDeclareOk): # Declare the queue - name = b'' if self.queue.anonymous else self.queue.name + name = self.queue.name self.connection.method_and_watch( self.channel_id, @@ -403,7 +403,7 @@ def on_setup(self, payload): # type: (coolamqp.framing.base.AMQPMethodPayload) elif isinstance(payload, QueueDeclareOk): # did we need an anonymous name? - if self.queue.anonymous: + if not self.queue.name: self.queue.name = payload.queue.tobytes() queue_declared = False From 747144279c380c10ca5444e96f7ea55e2bd65f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= Date: Thu, 9 Jul 2020 18:54:54 +0200 Subject: [PATCH 5/7] v1.2.7 --- coolamqp/attaches/declarer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coolamqp/attaches/declarer.py b/coolamqp/attaches/declarer.py index 94289a3..e81d786 100644 --- a/coolamqp/attaches/declarer.py +++ b/coolamqp/attaches/declarer.py @@ -138,7 +138,7 @@ def _callback(self, payload): self.obj) # todo access not threadsafe self.declarer.on_discard(self.obj) else: - if isinstance(payload, QueueDeclareOk) and self.obj.anonymous: + if isinstance(payload, QueueDeclareOk) and not self.obj.name: self.obj.name = payload.queue self.span_finished() From 94485f28ace9e7cb92d314718c3719e099aa19fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= Date: Thu, 9 Jul 2020 19:02:23 +0200 Subject: [PATCH 6/7] improved declaration handling --- coolamqp/attaches/consumer.py | 2 +- coolamqp/attaches/declarer.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/coolamqp/attaches/consumer.py b/coolamqp/attaches/consumer.py index a18e089..d5f0c14 100644 --- a/coolamqp/attaches/consumer.py +++ b/coolamqp/attaches/consumer.py @@ -384,7 +384,7 @@ def on_setup(self, payload): # type: (coolamqp.framing.base.AMQPMethodPayload) elif isinstance(payload, ExchangeDeclareOk): # Declare the queue - name = self.queue.name + name = b'' if self.queue.anonymous else self.queue.name self.connection.method_and_watch( self.channel_id, diff --git a/coolamqp/attaches/declarer.py b/coolamqp/attaches/declarer.py index e81d786..084e542 100644 --- a/coolamqp/attaches/declarer.py +++ b/coolamqp/attaches/declarer.py @@ -140,6 +140,7 @@ def _callback(self, payload): else: if isinstance(payload, QueueDeclareOk) and not self.obj.name: self.obj.name = payload.queue + self.obj.anonymous = False self.span_finished() if self.fut is not None: From f1ed1488dcbe3cf019c27518a34b5a700c33de9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= Date: Thu, 9 Jul 2020 19:04:23 +0200 Subject: [PATCH 7/7] improved declaration handling --- coolamqp/attaches/declarer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coolamqp/attaches/declarer.py b/coolamqp/attaches/declarer.py index 084e542..ace6b99 100644 --- a/coolamqp/attaches/declarer.py +++ b/coolamqp/attaches/declarer.py @@ -138,7 +138,7 @@ def _callback(self, payload): self.obj) # todo access not threadsafe self.declarer.on_discard(self.obj) else: - if isinstance(payload, QueueDeclareOk) and not self.obj.name: + if isinstance(payload, QueueDeclareOk) and self.obj.anonymous: self.obj.name = payload.queue self.obj.anonymous = False