Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-python/aiohttp-cors/files/, dev-python/aiohttp-cors/
Date: Tue, 31 Mar 2020 20:07:43
Message-Id: 1585684634.41f57b145a777f4f247b1ad541f663d50c081a0a.andrewammerlaan@gentoo
1 commit: 41f57b145a777f4f247b1ad541f663d50c081a0a
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
3 AuthorDate: Tue Mar 31 19:57:14 2020 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
5 CommitDate: Tue Mar 31 19:57:14 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=41f57b14
7
8 dev-python/aiohttp-cors: add patch for py3_7
9
10 https://github.com/aio-libs/aiohttp-cors/pull/278
11
12 Package-Manager: Portage-2.3.96, Repoman-2.3.22
13 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
14
15 dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild | 7 ++++---
16 .../files/aiohttp-cors-0.7.0-py3_7.patch | 22 ++++++++++++++++++++++
17 2 files changed, 26 insertions(+), 3 deletions(-)
18
19 diff --git a/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild
20 index bcc2930..4e87a24 100644
21 --- a/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild
22 +++ b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild
23 @@ -3,14 +3,13 @@
24
25 EAPI=7
26
27 -PYTHON_COMPAT=( python3_6 )
28 +PYTHON_COMPAT=( python3_{6,7} )
29
30 inherit distutils-r1
31
32 DESCRIPTION="Implements CORS support for aiohttp asyncio-powered asynchronous HTTP server"
33 HOMEPAGE="https://github.com/aio-libs/aiohttp-cors"
34 SRC_URI="https://github.com/aio-libs/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
35 -EGIT_REPO_URI="https://github.com/aio-libs/aiohttp-cors"
36
37 LICENSE="Apache-2.0"
38 SLOT="0"
39 @@ -25,8 +24,10 @@ BDEPEND="
40
41 distutils_enable_tests pytest
42
43 +# https://github.com/aio-libs/aiohttp-cors/pull/278
44 PATCHES=(
45 - "${FILESDIR}"/aiohttp-cors-0.7.0-tests.patch
46 + "${FILESDIR}/${P}-tests.patch"
47 + "${FILESDIR}/${P}-py3_7.patch"
48 )
49
50 src_prepare() {
51
52 diff --git a/dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-py3_7.patch b/dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-py3_7.patch
53 new file mode 100644
54 index 0000000..e09119c
55 --- /dev/null
56 +++ b/dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-py3_7.patch
57 @@ -0,0 +1,22 @@
58 +From e64b95848f3253157d831f4934841fceeaf9b2e3 Mon Sep 17 00:00:00 2001
59 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@×××××××.cz>
60 +Date: Thu, 14 Nov 2019 12:54:47 +0100
61 +Subject: [PATCH] Test instance type by isinstance, not issubclass
62 +
63 +Fixes https://github.com/aio-libs/aiohttp-cors/issues/277
64 +---
65 + tests/unit/test_cors_config.py | 2 +-
66 + 1 file changed, 1 insertion(+), 1 deletion(-)
67 +
68 +diff --git a/tests/unit/test_cors_config.py b/tests/unit/test_cors_config.py
69 +index 817410e..d494e20 100644
70 +--- a/tests/unit/test_cors_config.py
71 ++++ b/tests/unit/test_cors_config.py
72 +@@ -103,7 +103,7 @@ def test_static_resource(app, cors):
73 + "/file", "/", name="dynamic_named_route")
74 + assert len(app.router.keys()) == 1
75 + for resource in list(app.router.resources()):
76 +- if issubclass(resource, web.StaticResource):
77 ++ if isinstance(resource, web.StaticResource):
78 + cors.add(resource)
79 + assert len(app.router.keys()) == 1