diff --git a/coolamqp/framing/compilation/compile_definitions.py b/coolamqp/framing/compilation/compile_definitions.py index 855415b362f2a10e57f96a58d9625d32ea6d1f99..a39e42747796b8bd94eaedef8c6ba1254d0a2f08 100644 --- a/coolamqp/framing/compilation/compile_definitions.py +++ b/coolamqp/framing/compilation/compile_definitions.py @@ -42,13 +42,14 @@ AMQP is copyright (c) 2016 OASIS CoolAMQP is copyright (c) 2016 DMS Serwis s.c. -########################################### -# IMPORTANT NOTE -# Type of field may depend on the origin of packet. -# strings will be memoryviews if we received the packet -# while they may be bytes if we created it -# -# this has some use - speed :D +########################################################### +# IMPORTANT NOTE # +# Type of field may depend on the origin of packet. # +# strings will be memoryviews if we received the packet # +# while they may be bytes if we created it # +# # +# this has some use - speed :D # +########################################################### """ import struct, collections, warnings, logging, six diff --git a/coolamqp/framing/definitions.py b/coolamqp/framing/definitions.py index d76defe6a2cfd9af7e3423604482d05e7e4e56f4..8a9e7d8cb9f56227ac7d587864c5361ac5819f6c 100644 --- a/coolamqp/framing/definitions.py +++ b/coolamqp/framing/definitions.py @@ -10,15 +10,13 @@ AMQP is copyright (c) 2016 OASIS CoolAMQP is copyright (c) 2016 DMS Serwis s.c. -########################################################### +########################################### # IMPORTANT NOTE # Type of field may depend on the origin of packet. # strings will be memoryviews if we received the packet # while they may be bytes if we created it # # this has some use - speed :D -# Remember to call .tobytes() if you need so! -########################################################### """ import struct, collections, warnings, logging, six diff --git a/coolamqp/framing/field_table.py b/coolamqp/framing/field_table.py index 24a16fa5fcaa43bc90ef1bcb7bca06029af86b8f..04cb39a1c57be0b9421eb0736704e4173cb5c93d 100644 --- a/coolamqp/framing/field_table.py +++ b/coolamqp/framing/field_table.py @@ -76,7 +76,7 @@ FIELD_TYPES = { def enframe_field_value(buf, fv): value, type = fv - buf.write(type) + buf.write(type.encode('utf8')) opt = FIELD_TYPES[type] diff --git a/coolamqp/objects.py b/coolamqp/objects.py index b476f5f11b483c09e715af01a7da43e4bdeed880..6d2fcc4bf967257c060bcd571db1605649928096 100644 --- a/coolamqp/objects.py +++ b/coolamqp/objects.py @@ -79,7 +79,9 @@ class ReceivedMessage(Message): :param connect_id: connection ID. ClusterHandlerThread will check this in order not to ack messages that were received from a dead connection :param exchange_name: name of exchange this message was submitted to + :type exchange_name: memoryview :param routing_key: routing key with which this message was sent + :type routing_key: memoryview :param properties: a suitable BasicContentPropertyList subinstance :param delivery_tag: delivery tag assigned by AMQP broker to confirm this message