diff options
author | Louis Sautier <sbraz@gentoo.org> | 2021-08-18 12:39:30 +0200 |
---|---|---|
committer | Louis Sautier <sbraz@gentoo.org> | 2021-08-18 12:43:43 +0200 |
commit | 9b024927dbd3320ee310ad8c88338fe31315da78 (patch) | |
tree | 12a366fa101c8d6421f5837f14585c1f74e7f0eb /dev-python | |
parent | xdg.eclass: drop support for EAPI 4 (diff) | |
download | gentoo-9b024927dbd3320ee310ad8c88338fe31315da78.tar.gz gentoo-9b024927dbd3320ee310ad8c88338fe31315da78.tar.bz2 gentoo-9b024927dbd3320ee310ad8c88338fe31315da78.zip |
dev-python/aiodns: enable py3.10 and disable py3.7
Signed-off-by: Louis Sautier <sbraz@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/aiodns/aiodns-3.0.0.ebuild | 7 | ||||
-rw-r--r-- | dev-python/aiodns/files/aiodns-3.0.0-py3.10-tests.patch | 24 |
2 files changed, 30 insertions, 1 deletions
diff --git a/dev-python/aiodns/aiodns-3.0.0.ebuild b/dev-python/aiodns/aiodns-3.0.0.ebuild index 59ee54a21755..622a6671b886 100644 --- a/dev-python/aiodns/aiodns-3.0.0.ebuild +++ b/dev-python/aiodns/aiodns-3.0.0.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{7..9} ) +PYTHON_COMPAT=( python3_{8..10} ) inherit distutils-r1 @@ -21,6 +21,11 @@ RESTRICT="test" RDEPEND=">=dev-python/pycares-3[${PYTHON_USEDEP}]" DEPEND="${RDEPEND}" +PATCHES=( + # https://github.com/saghul/aiodns/commit/146286601fe80eb4ede8126769e79b5d5e63f64e + "${FILESDIR}/${P}-py3.10-tests.patch" +) + python_test() { "${EPYTHON}" tests.py -v || die } diff --git a/dev-python/aiodns/files/aiodns-3.0.0-py3.10-tests.patch b/dev-python/aiodns/files/aiodns-3.0.0-py3.10-tests.patch new file mode 100644 index 000000000000..19062f1c8861 --- /dev/null +++ b/dev-python/aiodns/files/aiodns-3.0.0-py3.10-tests.patch @@ -0,0 +1,24 @@ +From 146286601fe80eb4ede8126769e79b5d5e63f64e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Sat, 15 May 2021 10:03:01 +0200 +Subject: [PATCH] Remove loop= param from asyncio.sleep() to fix tests on + Python 3.10 + +Fixes #95 +--- + tests.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests.py b/tests.py +index 7b2279f..fc0e2b9 100755 +--- a/tests.py ++++ b/tests.py +@@ -116,7 +116,7 @@ def test_future_cancel(self): + f = self.resolver.query('google.com', 'A') + f.cancel() + async def coro(): +- await asyncio.sleep(0.1, loop=self.loop) ++ await asyncio.sleep(0.1) + await f + try: + self.loop.run_until_complete(coro()) |