Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/jupyter_client/files/, dev-python/jupyter_client/
Date: Tue, 22 Dec 2020 09:00:38
Message-Id: 1608626730.54cec34b3cfbd07c43fcb4818febcb6477829cfb.mgorny@gentoo
1 commit: 54cec34b3cfbd07c43fcb4818febcb6477829cfb
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 22 08:45:30 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 22 08:45:30 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54cec34b
7
8 dev-python/jupyter_client: Fix tests with dev-python/msgpack-1*
9
10 Closes: https://bugs.gentoo.org/761217
11 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
12
13 .../files/jupyter_client-6.1.6-msgpack-1.patch | 28 ++++++++++++++++++++++
14 .../jupyter_client/jupyter_client-6.1.6-r2.ebuild | 4 ++++
15 2 files changed, 32 insertions(+)
16
17 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
18 new file mode 100644
19 index 00000000000..34a95d04ac7
20 --- /dev/null
21 +++ b/dev-python/jupyter_client/files/jupyter_client-6.1.6-msgpack-1.patch
22 @@ -0,0 +1,28 @@
23 +From bb973fa33952c1a803097852c031b3979dae607c Mon Sep 17 00:00:00 2001
24 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
25 +Date: Tue, 22 Dec 2020 09:38:13 +0100
26 +Subject: [PATCH] Fix test_session with msgpack-1
27 +
28 +Replace the encoding parameter with raw=False to fix test_session
29 +with msgpack-1.0.0+. The encoding parameter was already deprecated
30 +in msgpack-0.6.2, and raw=False is compatible with that version too.
31 +---
32 + jupyter_client/tests/test_session.py | 2 +-
33 + 1 file changed, 1 insertion(+), 1 deletion(-)
34 +
35 +diff --git a/jupyter_client/tests/test_session.py b/jupyter_client/tests/test_session.py
36 +index d0ec662..45be9a9 100644
37 +--- a/jupyter_client/tests/test_session.py
38 ++++ b/jupyter_client/tests/test_session.py
39 +@@ -304,7 +304,7 @@ class TestSession(SessionTestCase):
40 +
41 + session = ss.Session(
42 + pack=msgpack.packb,
43 +- unpack=lambda buf: msgpack.unpackb(buf, encoding='utf8'),
44 ++ unpack=lambda buf: msgpack.unpackb(buf, raw=False),
45 + )
46 + self._datetime_test(session)
47 +
48 +--
49 +2.29.2
50 +
51
52 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
53 index 7f009cdea52..50c5df6246e 100644
54 --- a/dev-python/jupyter_client/jupyter_client-6.1.6-r2.ebuild
55 +++ b/dev-python/jupyter_client/jupyter_client-6.1.6-r2.ebuild
56 @@ -32,3 +32,7 @@ DEPEND="${RDEPEND}
57 )"
58
59 distutils_enable_tests pytest
60 +
61 +PATCHES=(
62 + "${FILESDIR}"/${P}-msgpack-1.patch
63 +)