Skip to content
Snippets Groups Projects
Commit 50643b0f authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

v0.89

parent d235129e
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,6 @@ if you need every CPU cycle you can get.
* Consumer being cancelled with a CCN
* v0.88:
* **API changes:**
* Cluster.start will RuntimeError if called more than once
* Cluster.shutdown will RuntimeError if called without .start
* Cluster.start will RuntimeError if called more than once
* Cluster.shutdown will RuntimeError if called without .start
* Warning with content list is shorter
......@@ -72,7 +72,8 @@ class Message(object):
self.properties = properties
LAMBDA_NONE = lambda: None
def LAMBDA_NONE():
pass
class ReceivedMessage(Message):
......@@ -125,7 +126,16 @@ class Exchange(object):
direct = None # the direct exchange
def __init__(self, name=u'', type=b'direct', durable=True, auto_delete=False):
"""
:type name: unicode is preferred, binary type will get decoded to unicode with utf8
:param type: exchange type. Please pass a binary type.
"""
if isinstance(name, six.binary_type):
name = name.decode('utf8')
self.name = name
if isinstance(type, six.text_type):
type = type.encode('utf8')
warnings.warn(u'type should be a binary type')
......@@ -135,7 +145,7 @@ class Exchange(object):
def __repr__(self):
return u'Exchange(%s, %s, %s, %s)' % (
repr(self.name), repr(self.type), repr(self.durable), repr(self.auto_delete))
repr(self.name), repr(self.type), repr(self.durable), repr(self.auto_delete))
def __hash__(self):
return self.name.__hash__()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment