1 |
commit: 3f32924fe148da774d897f66a2ff25302de21115 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 1 16:46:12 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 1 17:53:38 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f32924f |
7 |
|
8 |
dev-python/ipywidgets: Port to py3.10 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
.../ipywidgets/files/ipywidgets-7.6.3-py310.patch | 37 ++++++++++++++++++++++ |
13 |
dev-python/ipywidgets/ipywidgets-7.6.3.ebuild | 8 +++-- |
14 |
2 files changed, 43 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/dev-python/ipywidgets/files/ipywidgets-7.6.3-py310.patch b/dev-python/ipywidgets/files/ipywidgets-7.6.3-py310.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..f3d82d0a8ec |
19 |
--- /dev/null |
20 |
+++ b/dev-python/ipywidgets/files/ipywidgets-7.6.3-py310.patch |
21 |
@@ -0,0 +1,37 @@ |
22 |
+From f9a13dbb3b8f1ffefef483bdb4c14f04f7743ff1 Mon Sep 17 00:00:00 2001 |
23 |
+From: Jason Grout <jgrout6@×××××××××.net> |
24 |
+Date: Tue, 31 Dec 2019 12:57:52 -0800 |
25 |
+Subject: [PATCH] Fix more python 3 deprecations |
26 |
+ |
27 |
+--- |
28 |
+ ipywidgets/widgets/interaction.py | 2 +- |
29 |
+ ipywidgets/widgets/tests/test_interaction.py | 3 ++- |
30 |
+ 2 files changed, 3 insertions(+), 2 deletions(-) |
31 |
+ |
32 |
+diff --git a/ipywidgets/widgets/interaction.py b/ipywidgets/widgets/interaction.py |
33 |
+index 3dd7272047..6e3b9fc955 100644 |
34 |
+--- a/ipywidgets/widgets/interaction.py |
35 |
++++ b/ipywidgets/widgets/interaction.py |
36 |
+@@ -246,7 +246,7 @@ def update(self, *args): |
37 |
+ except Exception as e: |
38 |
+ ip = get_ipython() |
39 |
+ if ip is None: |
40 |
+- self.log.warn("Exception in interact callback: %s", e, exc_info=True) |
41 |
++ self.log.warning("Exception in interact callback: %s", e, exc_info=True) |
42 |
+ else: |
43 |
+ ip.showtraceback() |
44 |
+ finally: |
45 |
+diff --git a/ipywidgets/widgets/tests/test_interaction.py b/ipywidgets/widgets/tests/test_interaction.py |
46 |
+index 1ee946744e..c792c5377a 100644 |
47 |
+--- a/ipywidgets/widgets/tests/test_interaction.py |
48 |
++++ b/ipywidgets/widgets/tests/test_interaction.py |
49 |
+@@ -249,7 +249,8 @@ def test_iterable_tuple(): |
50 |
+ check_widgets(c, lis=d) |
51 |
+ |
52 |
+ def test_mapping(): |
53 |
+- from collections import Mapping, OrderedDict |
54 |
++ from collections.abc import Mapping |
55 |
++ from collections import OrderedDict |
56 |
+ class TestMapping(Mapping): |
57 |
+ def __init__(self, values): |
58 |
+ self.values = values |
59 |
|
60 |
diff --git a/dev-python/ipywidgets/ipywidgets-7.6.3.ebuild b/dev-python/ipywidgets/ipywidgets-7.6.3.ebuild |
61 |
index a8791123ada..21b3e27415a 100644 |
62 |
--- a/dev-python/ipywidgets/ipywidgets-7.6.3.ebuild |
63 |
+++ b/dev-python/ipywidgets/ipywidgets-7.6.3.ebuild |
64 |
@@ -1,10 +1,10 @@ |
65 |
# Copyright 1999-2021 Gentoo Authors |
66 |
# Distributed under the terms of the GNU General Public License v2 |
67 |
|
68 |
-EAPI=7 |
69 |
+EAPI=8 |
70 |
|
71 |
DISTUTILS_USE_SETUPTOOLS=no |
72 |
-PYTHON_COMPAT=( python3_{7..9} ) |
73 |
+PYTHON_COMPAT=( python3_{8..10} ) |
74 |
PYTHON_REQ_USE="threads(+)" |
75 |
|
76 |
inherit distutils-r1 |
77 |
@@ -25,3 +25,7 @@ RDEPEND=" |
78 |
" |
79 |
|
80 |
distutils_enable_tests pytest |
81 |
+ |
82 |
+PATCHES=( |
83 |
+ "${FILESDIR}/${P}-py310.patch" |
84 |
+) |