Your message dated Fri, 7 Sep 2018 14:14:57 +0200
with message-id <[email protected]>
and subject line Closing this bug
has caused the Debian Bug report #895468,
regarding ryu: Fix test_0_call_bytearray failure
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
895468: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895468
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ryu
Version: 4.21+dfsg1-4
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu bionic ubuntu-patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * 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".


Thanks for considering the patch.


-- System Information:
Debian Release: buster/sid
  APT prefers bionic
  APT policy: (500, 'bionic'), (500, 'artful-updates')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.15.0-13-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru ryu-4.21+dfsg1/debian/patches/remove-failing-test.patch 
ryu-4.21+dfsg1/debian/patches/remove-failing-test.patch
--- ryu-4.21+dfsg1/debian/patches/remove-failing-test.patch     2018-03-18 
17:00:30.000000000 -0400
+++ ryu-4.21+dfsg1/debian/patches/remove-failing-test.patch     1969-12-31 
19:00:00.000000000 -0500
@@ -1,23 +0,0 @@
-Description: Remove failing test
- This test fails for an unknown reasons, let's just remove it.
-Author: Thomas Goirand <[email protected]>
-Forwarded: no
-Last-Update: 2018-02-16
-
---- ryu-4.21+dfsg1.orig/ryu/tests/unit/lib/test_rpc.py
-+++ ryu-4.21+dfsg1/ryu/tests/unit/lib/test_rpc.py
-@@ -138,14 +138,6 @@ 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)
--
-     def test_1_shutdown_wr(self):
-         # test if the server shutdown on disconnect
-         self._client_sock.shutdown(socket.SHUT_WR)
diff -Nru ryu-4.21+dfsg1/debian/patches/series 
ryu-4.21+dfsg1/debian/patches/series
--- ryu-4.21+dfsg1/debian/patches/series        2018-03-18 17:00:30.000000000 
-0400
+++ ryu-4.21+dfsg1/debian/patches/series        2018-04-11 16:24:30.000000000 
-0400
@@ -1,2 +1,2 @@
 remove-test-requirements-units.patch
-remove-failing-test.patch
+test_rpc-Adopt-to-msgpack-python-0.50.patch
diff -Nru 
ryu-4.21+dfsg1/debian/patches/test_rpc-Adopt-to-msgpack-python-0.50.patch 
ryu-4.21+dfsg1/debian/patches/test_rpc-Adopt-to-msgpack-python-0.50.patch
--- ryu-4.21+dfsg1/debian/patches/test_rpc-Adopt-to-msgpack-python-0.50.patch   
1969-12-31 19:00:00.000000000 -0500
+++ ryu-4.21+dfsg1/debian/patches/test_rpc-Adopt-to-msgpack-python-0.50.patch   
2018-04-11 16:24:09.000000000 -0400
@@ -0,0 +1,44 @@
+From 81cdd4f0d76952c16d6e65e6af8da82702175220 Mon Sep 17 00:00:00 2001
+From: IWASE Yusuke <[email protected]>
+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 <[email protected]>
+Signed-off-by: FUJITA Tomonori <[email protected]>
+---
+ 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
+

--- End Message ---
--- Begin Message ---
The current version in Sid already has the patch, which was applied
upstream. Therefore, closing this bug.

Cheers,

Thomas Goirand (zigo)

--- End Message ---

Reply via email to