From 1129a5fc150f0e15fe5bf14f2f9c04ac665210c7 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Tue, 13 Sep 2011 16:50:36 +0100 Subject: [PATCH] Tests passing on Python 3.2 --- kombu/serialization.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kombu/serialization.py b/kombu/serialization.py index 12689945..0f5d3298 100644 --- a/kombu/serialization.py +++ b/kombu/serialization.py @@ -20,6 +20,7 @@ except ImportError: cpickle = None # noqa from .exceptions import SerializerNotInstalled +from .utils.encoding import str_to_bytes __all__ = ["pickle", "bytes_type", "encode", "decode", "register", "unregister"] @@ -297,7 +298,7 @@ def register_pickle(): # pickle doesn't handle unicode. def unpickle(s): - return pickle.loads(str(s)) + return pickle.loads(str_to_bytes(s)) registry.register('pickle', pickle.dumps, unpickle, content_type='application/x-python-serialize',