From 02b14a7dd6d943b3e618b1ab546c920bf1aea727 Mon Sep 17 00:00:00 2001
From: Piotr Maslanka <piotr.maslanka@henrietta.com.pl>
Date: Tue, 10 Jan 2017 06:27:35 +0100
Subject: [PATCH] py3k!

---
 coolamqp/framing/compilation/compile_definitions.py |  2 +-
 coolamqp/framing/compilation/textcode_fields.py     |  2 +-
 coolamqp/framing/field_table.py                     |  2 +-
 coolamqp/uplink/handshake.py                        | 10 +++++-----
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/coolamqp/framing/compilation/compile_definitions.py b/coolamqp/framing/compilation/compile_definitions.py
index 57e7794..855415b 100644
--- a/coolamqp/framing/compilation/compile_definitions.py
+++ b/coolamqp/framing/compilation/compile_definitions.py
@@ -312,7 +312,7 @@ Field = collections.namedtuple('Field', ('name', 'type', 'basic_type', 'reserved
 
         # ============================================ Do methods for this class
         for method in cls.methods:
-            full_class_name = '%s%s' % (name_class(cls.name), format_method_class_name(method.name))
+            full_class_name = u'%s%s' % (name_class(cls.name), format_method_class_name(method.name))
 
             # annotate types
             method.fields = [field._replace(basic_type=domain_to_basic_type[field.type]) for field in method.fields]
diff --git a/coolamqp/framing/compilation/textcode_fields.py b/coolamqp/framing/compilation/textcode_fields.py
index 3a17220..5fb44d8 100644
--- a/coolamqp/framing/compilation/textcode_fields.py
+++ b/coolamqp/framing/compilation/textcode_fields.py
@@ -21,7 +21,7 @@ import math
 from coolamqp.framing.base import BASIC_TYPES, DYNAMIC_BASIC_TYPES
 from coolamqp.framing.compilation.utilities import format_field_name, get_size
 
-def get_counter(fields, prefix='', indent_level=2):
+def get_counter(fields, prefix=u'', indent_level=2):
     """
     Emit code that counts how long this struct is.
 
diff --git a/coolamqp/framing/field_table.py b/coolamqp/framing/field_table.py
index f25aae3..24a16fa 100644
--- a/coolamqp/framing/field_table.py
+++ b/coolamqp/framing/field_table.py
@@ -2,7 +2,7 @@
 """
 That funny type, field-table...
 
-A field-value is of form (value::any, type::char)
+A field-value is of form (value::any, type::unicode)
 
 An array is of form [field-value1, field-value2, ...]
 
diff --git a/coolamqp/uplink/handshake.py b/coolamqp/uplink/handshake.py
index adcb938..083dcfe 100644
--- a/coolamqp/uplink/handshake.py
+++ b/coolamqp/uplink/handshake.py
@@ -21,11 +21,11 @@ SUPPORTED_EXTENSIONS = [
 CLIENT_DATA = [
         # because RabbitMQ is some kind of a fascist and does not allow
         # these fields to be of type short-string
-        (b'product', (b'CoolAMQP', b'S')),
-        (b'version', (b'develop', b'S')),
-        (b'copyright', (b'Copyright (C) 2016-2017 DMS Serwis', b'S')),
-        (b'information', (b'Licensed under the MIT License.\nSee https://github.com/smok-serwis/coolamqp for details', b'S')),
-        (b'capabilities', ([(capa, (True, b't')) for capa in SUPPORTED_EXTENSIONS], b'F')),
+        (b'product', (b'CoolAMQP', 'S')),
+        (b'version', (b'develop', 'S')),
+        (b'copyright', (b'Copyright (C) 2016-2017 DMS Serwis', 'S')),
+        (b'information', (b'Licensed under the MIT License.\nSee https://github.com/smok-serwis/coolamqp for details', 'S')),
+        (b'capabilities', ([(capa, (True, 't')) for capa in SUPPORTED_EXTENSIONS], 'F')),
       ]
 
 WATCHDOG_TIMEOUT = 10
-- 
GitLab