commit:     73150fbf0a09f34520a7721298a07c81dacae77a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 20 18:34:53 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jun 20 18:34:53 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73150fbf

dev-python/pytables: Enable py3.10

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../pytables/files/pytables-3.6.1-py310.patch      | 49 ++++++++++++++++++++++
 dev-python/pytables/pytables-3.6.1.ebuild          |  5 ++-
 2 files changed, 52 insertions(+), 2 deletions(-)

diff --git a/dev-python/pytables/files/pytables-3.6.1-py310.patch 
b/dev-python/pytables/files/pytables-3.6.1-py310.patch
new file mode 100644
index 00000000000..600516d1639
--- /dev/null
+++ b/dev-python/pytables/files/pytables-3.6.1-py310.patch
@@ -0,0 +1,49 @@
+From 2431150d691f5ccdb3da204a46e346c156ea2523 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbys...@in.waw.pl>
+Date: Mon, 16 Nov 2020 10:53:05 +0100
+Subject: [PATCH] doctest: adjust __init__ TypeError formatting
+
+Python3.10 includes the class name in the TypeError string for
+__init__(), so the literal match does not work anymore.
+---
+ tables/atom.py    | 4 ++--
+ tables/filters.py | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tables/atom.py b/tables/atom.py
+index 81d37c54..9cfd8609 100644
+--- a/tables/atom.py
++++ b/tables/atom.py
+@@ -569,10 +569,10 @@ class Atom(metaclass=MetaAtom):
+             >>> atom3 = atom1.copy(shape=(2, 2))
+             >>> print(atom3)
+             Int32Atom(shape=(2, 2), dflt=0)
+-            >>> atom1.copy(foobar=42)
++            >>> atom1.copy(foobar=42) #doctest: +ELLIPSIS
+             Traceback (most recent call last):
+             ...
+-            TypeError: __init__() got an unexpected keyword argument 'foobar'
++            TypeError: ...__init__() got an unexpected keyword argument 
'foobar'
+ 
+         """
+         newargs = self._get_init_args()
+diff --git a/tables/filters.py b/tables/filters.py
+index f809ce77..7cb9b02d 100644
+--- a/tables/filters.py
++++ b/tables/filters.py
+@@ -432,10 +432,10 @@ class Filters:
+             Filters(complevel=0, shuffle=False, bitshuffle=False, 
fletcher32=False, least_significant_digit=None)
+             >>> print(filters3)
+             Filters(complevel=1, complib='zlib', shuffle=False, 
bitshuffle=False, fletcher32=False, least_significant_digit=None)
+-            >>> filters1.copy(foobar=42)
++            >>> filters1.copy(foobar=42) #doctest: +ELLIPSIS
+             Traceback (most recent call last):
+             ...
+-            TypeError: __init__() got an unexpected keyword argument 'foobar'
++            TypeError: ...__init__() got an unexpected keyword argument 
'foobar'
+ 
+         """
+ 
+-- 
+2.32.0
+

diff --git a/dev-python/pytables/pytables-3.6.1.ebuild 
b/dev-python/pytables/pytables-3.6.1.ebuild
index b504eaf8f32..67448098a5b 100644
--- a/dev-python/pytables/pytables-3.6.1.ebuild
+++ b/dev-python/pytables/pytables-3.6.1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{8..9} )
+PYTHON_COMPAT=( python3_{8..10} )
 PYTHON_REQ_USE="threads(+)"
 
 MY_PN=tables
@@ -46,6 +46,7 @@ DOCS=( RELEASE_NOTES.txt THANKS )
 
 PATCHES=(
        "${FILESDIR}"/${P}-numpy-float.patch
+       "${FILESDIR}"/${P}-py310.patch
 )
 
 python_prepare_all() {
@@ -64,7 +65,7 @@ python_compile() {
 
 python_test() {
        cd "${BUILD_DIR}"/lib* || die
-       ${EPYTHON} tables/tests/test_all.py || die
+       "${EPYTHON}" tables/tests/test_all.py -v || die
 }
 
 python_install_all() {

Reply via email to