From 6636a03c9f29874c1151f6f6e14935fd781cc171 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Tue, 10 Sep 2013 15:42:04 +0100 Subject: [PATCH 1/7] flakes --- kombu/tests/transport/test_pyamqp.py | 1 - 1 file changed, 1 deletion(-) diff --git a/kombu/tests/transport/test_pyamqp.py b/kombu/tests/transport/test_pyamqp.py index 1a25f836..b4ca48ea 100644 --- a/kombu/tests/transport/test_pyamqp.py +++ b/kombu/tests/transport/test_pyamqp.py @@ -3,7 +3,6 @@ from __future__ import with_statement import sys -from functools import partial from mock import patch from nose import SkipTest from itertools import count From 1fa9749ee3850f28dab5719aee946d3761208281 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Tue, 10 Sep 2013 16:56:15 +0100 Subject: [PATCH 2/7] Travis CI's Python 2.5 is broken --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 087eb1be..4a18d765 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: python python: - - 2.5 - 2.6 - 2.7 - 3.2 From b8e6365d4613b38d1ba3a86f70a7daf763ee143a Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Tue, 10 Sep 2013 16:57:26 +0100 Subject: [PATCH 3/7] nose-cover3 broken on py3.2 --- tox.ini | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tox.ini b/tox.ini index c403d40b..862a15fa 100644 --- a/tox.ini +++ b/tox.ini @@ -29,17 +29,6 @@ commands = {toxinidir}/extra/release/removepyc.sh {toxinidir} -r{toxinidir}/requirements/test-py3k.txt nosetests -vd kombu.tests \ - --with-coverage3 \ - --cover3-branch \ - --cover3-xml \ - --cover3-xml-file={toxinidir}/coverage.xml \ - #--cover3-html \ - #--cover3-html-dir={toxinidir}/cover \ - --cover3-package=kombu \ - --cover3-exclude="kombu kombu.utils.* \ - kombu.transport.mongodb \ - kombu.transport.beanstalk \ - kombu.transport.zookeeper" \ --with-xunit \ --xunit-file={toxinidir}/nosetests.xml From 4e3bb729bd3a07e037d64da4c08320680a12ef1c Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Tue, 10 Sep 2013 17:31:00 +0100 Subject: [PATCH 4/7] [tox] Fixes typo test-py3k -> test3 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 862a15fa..a7afba78 100644 --- a/tox.ini +++ b/tox.ini @@ -26,7 +26,7 @@ deps = -r{toxinidir}/requirements/default.txt commands = {toxinidir}/extra/release/removepyc.sh {toxinidir} {envbindir}/pip install \ --download-cache={toxworkdir}/_download \ - -r{toxinidir}/requirements/test-py3k.txt + -r{toxinidir}/requirements/test3.txt nosetests -vd kombu.tests \ --with-xunit \ From ef03c5a344a91950b48ec0afc689078567380779 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Tue, 10 Sep 2013 17:56:57 +0100 Subject: [PATCH 5/7] Trying to fix CI for Py3.2 --- kombu/tests/test_serialization.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kombu/tests/test_serialization.py b/kombu/tests/test_serialization.py index 82152a2c..44d0665f 100644 --- a/kombu/tests/test_serialization.py +++ b/kombu/tests/test_serialization.py @@ -11,7 +11,7 @@ from kombu.serialization import (registry, register, SerializerNotInstalled, raw_encode, register_yaml, register_msgpack, decode, bytes_t, pickle, pickle_protocol, unregister, register_pickle) -from kombu.utils.encoding import str_t +from kombu.utils.encoding import str_t, str_to_bytes from .utils import TestCase from .utils import mask_modules, skip_if_not_module @@ -58,11 +58,11 @@ unicode: "Th\\xE9 quick brown fox jumps over th\\xE9 lazy dog" msgpack_py_data = dict(py_data) # Unicode chars are lost in transmit :( msgpack_py_data['unicode'] = 'Th quick brown fox jumps over th lazy dog' -msgpack_data = b64decode("""\ +msgpack_data = b64decode(str_to_bytes("""\ haNpbnQKpWZsb2F0y0AJIftTyNTxpGxpc3SUpmdlb3JnZaVqZXJyeaZlbGFpbmWlY29zbW+mc3Rya\ W5n2gArVGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZ6d1bmljb2Rl2g\ ApVGggcXVpY2sgYnJvd24gZm94IGp1bXBzIG92ZXIgdGggbGF6eSBkb2c=\ -""") +""")) def say(m): From 11d5674a8dc567f69d6a7a4f119e45faec88c0d8 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Tue, 10 Sep 2013 18:05:25 +0100 Subject: [PATCH 6/7] [Py3.2] msgpack transforms lists into tuples in some versions --- kombu/tests/test_serialization.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kombu/tests/test_serialization.py b/kombu/tests/test_serialization.py index 44d0665f..5bd1eeb6 100644 --- a/kombu/tests/test_serialization.py +++ b/kombu/tests/test_serialization.py @@ -191,7 +191,11 @@ class test_Serialization(TestCase): res[k] = v.encode() if isinstance(v, (list, tuple)): res[k] = [i.encode() for i in v] - print('RES: %r' % (res, )) + + # On Python 3.2 (or some msgpack versions maybe? lists are magically + # transformed into tuples... + if res != msgpack_py_data: + res['list'] = tuple(res['list']) self.assertEqual( msgpack_py_data, res, From ac4ae2576b98559c7d3ae707227c4ac5015817c1 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Tue, 10 Sep 2013 18:28:46 +0100 Subject: [PATCH 7/7] :rage1: --- kombu/tests/test_serialization.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kombu/tests/test_serialization.py b/kombu/tests/test_serialization.py index 5bd1eeb6..1d1e96d7 100644 --- a/kombu/tests/test_serialization.py +++ b/kombu/tests/test_serialization.py @@ -194,8 +194,8 @@ class test_Serialization(TestCase): # On Python 3.2 (or some msgpack versions maybe? lists are magically # transformed into tuples... - if res != msgpack_py_data: - res['list'] = tuple(res['list']) + if isinstance(res['list'], tuple): + msgpack_py_data['list'] = tuple(msgpack_py_data['list']) self.assertEqual( msgpack_py_data, res,