summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-12-22 09:45:30 +0100
committerMichał Górny <mgorny@gentoo.org>2020-12-22 09:45:30 +0100
commit54cec34b3cfbd07c43fcb4818febcb6477829cfb (patch)
tree5ae23f430b0c1e22ad72cc32392b804bbee42724 /dev-python
parentdev-python/jupyter_client: Fix remote-id (diff)
downloadgentoo-54cec34b3cfbd07c43fcb4818febcb6477829cfb.tar.gz
gentoo-54cec34b3cfbd07c43fcb4818febcb6477829cfb.tar.bz2
gentoo-54cec34b3cfbd07c43fcb4818febcb6477829cfb.zip
dev-python/jupyter_client: Fix tests with dev-python/msgpack-1*
Closes: https://bugs.gentoo.org/761217 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/jupyter_client/files/jupyter_client-6.1.6-msgpack-1.patch28
-rw-r--r--dev-python/jupyter_client/jupyter_client-6.1.6-r2.ebuild4
2 files changed, 32 insertions, 0 deletions
diff --git a/dev-python/jupyter_client/files/jupyter_client-6.1.6-msgpack-1.patch b/dev-python/jupyter_client/files/jupyter_client-6.1.6-msgpack-1.patch
new file mode 100644
index 000000000000..34a95d04ac78
--- /dev/null
+++ b/dev-python/jupyter_client/files/jupyter_client-6.1.6-msgpack-1.patch
@@ -0,0 +1,28 @@
+From bb973fa33952c1a803097852c031b3979dae607c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 22 Dec 2020 09:38:13 +0100
+Subject: [PATCH] Fix test_session with msgpack-1
+
+Replace the encoding parameter with raw=False to fix test_session
+with msgpack-1.0.0+. The encoding parameter was already deprecated
+in msgpack-0.6.2, and raw=False is compatible with that version too.
+---
+ jupyter_client/tests/test_session.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/jupyter_client/tests/test_session.py b/jupyter_client/tests/test_session.py
+index d0ec662..45be9a9 100644
+--- a/jupyter_client/tests/test_session.py
++++ b/jupyter_client/tests/test_session.py
+@@ -304,7 +304,7 @@ class TestSession(SessionTestCase):
+
+ session = ss.Session(
+ pack=msgpack.packb,
+- unpack=lambda buf: msgpack.unpackb(buf, encoding='utf8'),
++ unpack=lambda buf: msgpack.unpackb(buf, raw=False),
+ )
+ self._datetime_test(session)
+
+--
+2.29.2
+
diff --git a/dev-python/jupyter_client/jupyter_client-6.1.6-r2.ebuild b/dev-python/jupyter_client/jupyter_client-6.1.6-r2.ebuild
index 7f009cdea52e..50c5df6246e6 100644
--- a/dev-python/jupyter_client/jupyter_client-6.1.6-r2.ebuild
+++ b/dev-python/jupyter_client/jupyter_client-6.1.6-r2.ebuild
@@ -32,3 +32,7 @@ DEPEND="${RDEPEND}
)"
distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}"/${P}-msgpack-1.patch
+)