* [gentoo-commits] repo/gentoo:master commit in: dev-python/test_server/files/, dev-python/test_server/
@ 2021-08-19 19:38 Arthur Zamarin
0 siblings, 0 replies; only message in thread
From: Arthur Zamarin @ 2021-08-19 19:38 UTC (permalink / raw
To: gentoo-commits
commit: 885ea68df59def9ee1b27ca34f3dc17b957e0bab
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 19 19:07:55 2021 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Thu Aug 19 19:33:52 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=885ea68d
dev-python/test_server: enable py3.{9,10}, EAPI=8
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
.../files/test_server-0.0.31-fix-py3.10.patch | 20 ++++++++++++++++++++
dev-python/test_server/test_server-0.0.31.ebuild | 22 +++++++---------------
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 00000000000..755a641440a
--- /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 72065306994..7767107a859 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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-19 19:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-19 19:38 [gentoo-commits] repo/gentoo:master commit in: dev-python/test_server/files/, dev-python/test_server/ Arthur Zamarin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox