summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2021-08-19 22:07:55 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2021-08-19 22:33:52 +0300
commit885ea68df59def9ee1b27ca34f3dc17b957e0bab (patch)
tree323bfd646149dc0898db88e2f0de6c3aae7562dc /dev-python/test_server
parentapp-misc/mosquitto: Drop old versions (diff)
downloadgentoo-885ea68df59def9ee1b27ca34f3dc17b957e0bab.tar.gz
gentoo-885ea68df59def9ee1b27ca34f3dc17b957e0bab.tar.bz2
gentoo-885ea68df59def9ee1b27ca34f3dc17b957e0bab.zip
dev-python/test_server: enable py3.{9,10}, EAPI=8
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-python/test_server')
-rw-r--r--dev-python/test_server/files/test_server-0.0.31-fix-py3.10.patch20
-rw-r--r--dev-python/test_server/test_server-0.0.31.ebuild22
2 files changed, 27 insertions, 15 deletions
diff --git a/dev-python/test_server/files/test_server-0.0.31-fix-py3.10.patch b/dev-python/test_server/files/test_server-0.0.31-fix-py3.10.patch
new file mode 100644
index 000000000000..755a641440a5
--- /dev/null
+++ b/dev-python/test_server/files/test_server-0.0.31-fix-py3.10.patch
@@ -0,0 +1,20 @@
+From: Karthikeyan Singaravelan <tir.karthi@gmail.com>
+Date: Fri, 10 Apr 2020 06:30:21 +0000
+Subject: [PATCH] Import ABC from collections.abc instead of collections for
+ Python 3 compatibility.
+
+--- a/test_server/server.py
++++ b/test_server/server.py
+@@ -6,7 +6,11 @@
+ import time
+ import types
+ from six.moves.urllib.parse import urljoin
+-from collections import defaultdict, Iterable
++from collections import defaultdict
++try:
++ from collections.abc import Iterable
++except ImportError:
++ from collections import Iterable
+
+ import six
+ from webtest.http import StopableWSGIServer
diff --git a/dev-python/test_server/test_server-0.0.31.ebuild b/dev-python/test_server/test_server-0.0.31.ebuild
index 720653069947..7767107a8591 100644
--- a/dev-python/test_server/test_server-0.0.31.ebuild
+++ b/dev-python/test_server/test_server-0.0.31.ebuild
@@ -1,9 +1,9 @@
-# Copyright 2019-2020 Gentoo Authors
+# Copyright 2019-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7,8} pypy3 )
+PYTHON_COMPAT=( python3_{8..10} pypy3 )
inherit distutils-r1
DESCRIPTION="Server to test HTTP clients"
@@ -13,22 +13,14 @@ SRC_URI="https://github.com/lorien/test_server/archive/v${PV}.tar.gz -> ${P}.tar
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
RDEPEND="
>=dev-python/bottle-0.12.13[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
dev-python/webtest[${PYTHON_USEDEP}]"
-distutils_enable_tests pytest
-
-src_prepare() {
- distutils-r1_src_prepare
+PATCHES=(
+ "${FILESDIR}/${P}-fix-py3.10.patch"
+)
- # broken on py2.7, upstream knows
- sed -i -e '5a\
-import sys' \
- -e '/test_null_bytes/i\
-@pytest.mark.skipif(sys.hexversion < 0x03000000, reason="broken on py2")' \
- test/server.py || die
-}
+distutils_enable_tests pytest