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/pytables/files/, dev-python/pytables/
Date: Sun, 20 Jun 2021 18:36:41
Message-Id: 1624214093.73150fbf0a09f34520a7721298a07c81dacae77a.mgorny@gentoo
1 commit: 73150fbf0a09f34520a7721298a07c81dacae77a
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 20 18:34:53 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 20 18:34:53 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73150fbf
7
8 dev-python/pytables: Enable py3.10
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 .../pytables/files/pytables-3.6.1-py310.patch | 49 ++++++++++++++++++++++
13 dev-python/pytables/pytables-3.6.1.ebuild | 5 ++-
14 2 files changed, 52 insertions(+), 2 deletions(-)
15
16 diff --git a/dev-python/pytables/files/pytables-3.6.1-py310.patch b/dev-python/pytables/files/pytables-3.6.1-py310.patch
17 new file mode 100644
18 index 00000000000..600516d1639
19 --- /dev/null
20 +++ b/dev-python/pytables/files/pytables-3.6.1-py310.patch
21 @@ -0,0 +1,49 @@
22 +From 2431150d691f5ccdb3da204a46e346c156ea2523 Mon Sep 17 00:00:00 2001
23 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@××××××.pl>
24 +Date: Mon, 16 Nov 2020 10:53:05 +0100
25 +Subject: [PATCH] doctest: adjust __init__ TypeError formatting
26 +
27 +Python3.10 includes the class name in the TypeError string for
28 +__init__(), so the literal match does not work anymore.
29 +---
30 + tables/atom.py | 4 ++--
31 + tables/filters.py | 4 ++--
32 + 2 files changed, 4 insertions(+), 4 deletions(-)
33 +
34 +diff --git a/tables/atom.py b/tables/atom.py
35 +index 81d37c54..9cfd8609 100644
36 +--- a/tables/atom.py
37 ++++ b/tables/atom.py
38 +@@ -569,10 +569,10 @@ class Atom(metaclass=MetaAtom):
39 + >>> atom3 = atom1.copy(shape=(2, 2))
40 + >>> print(atom3)
41 + Int32Atom(shape=(2, 2), dflt=0)
42 +- >>> atom1.copy(foobar=42)
43 ++ >>> atom1.copy(foobar=42) #doctest: +ELLIPSIS
44 + Traceback (most recent call last):
45 + ...
46 +- TypeError: __init__() got an unexpected keyword argument 'foobar'
47 ++ TypeError: ...__init__() got an unexpected keyword argument 'foobar'
48 +
49 + """
50 + newargs = self._get_init_args()
51 +diff --git a/tables/filters.py b/tables/filters.py
52 +index f809ce77..7cb9b02d 100644
53 +--- a/tables/filters.py
54 ++++ b/tables/filters.py
55 +@@ -432,10 +432,10 @@ class Filters:
56 + Filters(complevel=0, shuffle=False, bitshuffle=False, fletcher32=False, least_significant_digit=None)
57 + >>> print(filters3)
58 + Filters(complevel=1, complib='zlib', shuffle=False, bitshuffle=False, fletcher32=False, least_significant_digit=None)
59 +- >>> filters1.copy(foobar=42)
60 ++ >>> filters1.copy(foobar=42) #doctest: +ELLIPSIS
61 + Traceback (most recent call last):
62 + ...
63 +- TypeError: __init__() got an unexpected keyword argument 'foobar'
64 ++ TypeError: ...__init__() got an unexpected keyword argument 'foobar'
65 +
66 + """
67 +
68 +--
69 +2.32.0
70 +
71
72 diff --git a/dev-python/pytables/pytables-3.6.1.ebuild b/dev-python/pytables/pytables-3.6.1.ebuild
73 index b504eaf8f32..67448098a5b 100644
74 --- a/dev-python/pytables/pytables-3.6.1.ebuild
75 +++ b/dev-python/pytables/pytables-3.6.1.ebuild
76 @@ -3,7 +3,7 @@
77
78 EAPI=7
79
80 -PYTHON_COMPAT=( python3_{8..9} )
81 +PYTHON_COMPAT=( python3_{8..10} )
82 PYTHON_REQ_USE="threads(+)"
83
84 MY_PN=tables
85 @@ -46,6 +46,7 @@ DOCS=( RELEASE_NOTES.txt THANKS )
86
87 PATCHES=(
88 "${FILESDIR}"/${P}-numpy-float.patch
89 + "${FILESDIR}"/${P}-py310.patch
90 )
91
92 python_prepare_all() {
93 @@ -64,7 +65,7 @@ python_compile() {
94
95 python_test() {
96 cd "${BUILD_DIR}"/lib* || die
97 - ${EPYTHON} tables/tests/test_all.py || die
98 + "${EPYTHON}" tables/tests/test_all.py -v || die
99 }
100
101 python_install_all() {