diff -Nru ryu-4.15/debian/changelog ryu-4.15/debian/changelog --- ryu-4.15/debian/changelog 2017-08-04 20:47:51.000000000 +0000 +++ ryu-4.15/debian/changelog 2018-04-11 20:03:14.000000000 +0000 @@ -1,3 +1,11 @@ +ryu (4.15-0ubuntu2) bionic; urgency=medium + + * d/p/test_rpc-Adopt-to-msgpack-python-0.50.patch: Cherry-picked from + upstream to fix test failure "test_0_call_bytearray() did not raise + TypeError". + + -- Corey Bryant Wed, 11 Apr 2018 16:03:14 -0400 + ryu (4.15-0ubuntu1) artful; urgency=medium * New upstream release. diff -Nru ryu-4.15/debian/patches/series ryu-4.15/debian/patches/series --- ryu-4.15/debian/patches/series 2017-08-04 20:47:51.000000000 +0000 +++ ryu-4.15/debian/patches/series 2018-04-11 20:03:14.000000000 +0000 @@ -1 +1,2 @@ no-pip.patch +test_rpc-Adopt-to-msgpack-python-0.50.patch diff -Nru ryu-4.15/debian/patches/test_rpc-Adopt-to-msgpack-python-0.50.patch ryu-4.15/debian/patches/test_rpc-Adopt-to-msgpack-python-0.50.patch --- ryu-4.15/debian/patches/test_rpc-Adopt-to-msgpack-python-0.50.patch 1970-01-01 00:00:00.000000000 +0000 +++ ryu-4.15/debian/patches/test_rpc-Adopt-to-msgpack-python-0.50.patch 2018-04-11 20:03:14.000000000 +0000 @@ -0,0 +1,44 @@ +From 81cdd4f0d76952c16d6e65e6af8da82702175220 Mon Sep 17 00:00:00 2001 +From: IWASE Yusuke +Date: Thu, 11 Jan 2018 16:02:40 +0900 +Subject: [PATCH] test_rpc: Adopt to msgpack-python>=0.50 + +msgpack-python version 0.50 or later supports bytearray objects, this +patch fixes to adopt to this change. + +Signed-off-by: IWASE Yusuke +Signed-off-by: FUJITA Tomonori +--- + ryu/tests/unit/lib/test_rpc.py | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/ryu/tests/unit/lib/test_rpc.py b/ryu/tests/unit/lib/test_rpc.py +index 2df123ee..4fba5068 100644 +--- a/ryu/tests/unit/lib/test_rpc.py ++++ b/ryu/tests/unit/lib/test_rpc.py +@@ -138,13 +138,18 @@ class Test_rpc(unittest.TestCase): + assert result == obj + assert isinstance(result, numbers.Integral) + +- @raises(TypeError) + def test_0_call_bytearray(self): + c = rpc.Client(self._client_sock) + obj = bytearray(b'foo') +- result = c.call('resp', [obj]) +- assert result == obj +- assert isinstance(result, str) ++ # Note: msgpack-python version 0.50 or later supports bytearray ++ # objects, here ignores TypeError for the backward compatibility. ++ try: ++ result = c.call('resp', [obj]) ++ except TypeError: ++ # Case with msgpack-python version 0.4.x or earlier. ++ return ++ self.assertEqual(obj, result) ++ self.assertIsInstance(result, six.binary_type) + + def test_1_shutdown_wr(self): + # test if the server shutdown on disconnect +-- +2.15.1 +