commit:     792a27ab770d6dfc9c6fd95f1c3c0f71daf43233
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 19 19:33:29 2021 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Thu Aug 19 19:33:53 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=792a27ab

dev-python/wstools: enable py3.{9,10}

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 .../wstools/files/wstools-0.4.8-fix-py3.10.patch   | 29 ++++++++++++++++++++++
 dev-python/wstools/wstools-0.4.8.ebuild            | 17 ++++++-------
 2 files changed, 37 insertions(+), 9 deletions(-)

diff --git a/dev-python/wstools/files/wstools-0.4.8-fix-py3.10.patch 
b/dev-python/wstools/files/wstools-0.4.8-fix-py3.10.patch
new file mode 100644
index 00000000000..4baf12faf57
--- /dev/null
+++ b/dev-python/wstools/files/wstools-0.4.8-fix-py3.10.patch
@@ -0,0 +1,29 @@
+From c0aa811a845e78c27ef949b4dbc82dfcd9c3da68 Mon Sep 17 00:00:00 2001
+From: Arthur Zamarin <[email protected]>
+Date: Thu, 19 Aug 2021 22:27:48 +0300
+Subject: [PATCH] Fix import collections.abc for python 3.10
+
+Signed-off-by: Arthur Zamarin <[email protected]>
+---
+ wstools/Utility.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/wstools/Utility.py b/wstools/Utility.py
+index c1ccd65..f5f1453 100644
+--- a/wstools/Utility.py
++++ b/wstools/Utility.py
+@@ -33,7 +33,10 @@ try:
+     from UserDict import DictMixin  # noqa
+ except ImportError:
+     from collections import UserDict
+-    from collections import MutableMapping as DictMixin  # noqa
++    try:
++        from collections.abc import MutableMapping as DictMixin  # noqa
++    except ImportError:
++        from collections import MutableMapping as DictMixin  # noqa
+ 
+ from .TimeoutSocket import TimeoutSocket, TimeoutError  # noqa
+ 
+-- 
+2.33.0
+

diff --git a/dev-python/wstools/wstools-0.4.8.ebuild 
b/dev-python/wstools/wstools-0.4.8.ebuild
index edd464ea865..93c978f8bab 100644
--- a/dev-python/wstools/wstools-0.4.8.ebuild
+++ b/dev-python/wstools/wstools-0.4.8.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{7,8} )
+PYTHON_COMPAT=( python3_{8..10} )
 PYTHON_REQ_USE="xml(+)"
 
 inherit distutils-r1
@@ -15,17 +15,16 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~s390 sparc x86 
~amd64-linux ~x86-linux ~x64-macos"
-IUSE="test"
-RESTRICT="!test? ( test )"
 
-RDEPEND="
-       dev-python/six[${PYTHON_USEDEP}]
-"
-DEPEND="
-       ${RDEPEND}
+RDEPEND="dev-python/six[${PYTHON_USEDEP}]"
+BDEPEND="
        dev-python/pbr[${PYTHON_USEDEP}]
+       test? ( dev-python/pytest-timeout[${PYTHON_USEDEP}] )
 "
 
-PATCHES=( "${FILESDIR}"/${PN}-0.4.8-setup.patch )
+PATCHES=(
+       "${FILESDIR}/${P}-setup.patch"
+       "${FILESDIR}/${P}-fix-py3.10.patch"
+)
 
 distutils_enable_tests pytest

Reply via email to