Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: profiles/, dev-python/aiohttp-cors/files/, dev-python/aiohttp-cors/
Date: Mon, 04 May 2020 02:34:02
Message-Id: 1588559629.a46e470635d458aca5e3c4c8c7b9309a34d06ec9.zmedico@gentoo
1 commit: a46e470635d458aca5e3c4c8c7b9309a34d06ec9
2 Author: Gino McCarty <onigino <AT> protonmail <DOT> com>
3 AuthorDate: Mon Apr 20 02:00:20 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon May 4 02:33:49 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a46e4706
7
8 dev-python/aiohttp-cors: Revision for python 3.7 support
9
10 Bug: https://bugs.gentoo.org/712964
11 Package-Manager: Portage-2.3.99, Repoman-2.3.22
12 Signed-off-by: Gino McCarty <onigino <AT> protonmail.com>
13 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
14
15 .../aiohttp-cors/aiohttp-cors-0.7.0-r1.ebuild | 37 ++++++++++++++++++++++
16 .../files/aiohttp-cors-0.7.0-py3_7.patch | 23 ++++++++++++++
17 dev-python/aiohttp-cors/metadata.xml | 9 +++++-
18 profiles/package.mask | 1 -
19 4 files changed, 68 insertions(+), 2 deletions(-)
20
21 diff --git a/dev-python/aiohttp-cors/aiohttp-cors-0.7.0-r1.ebuild b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0-r1.ebuild
22 new file mode 100644
23 index 00000000000..eded3a04388
24 --- /dev/null
25 +++ b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0-r1.ebuild
26 @@ -0,0 +1,37 @@
27 +# Copyright 1999-2020 Gentoo Authors
28 +# Distributed under the terms of the GNU General Public License v2
29 +
30 +EAPI=7
31 +
32 +PYTHON_COMPAT=( python3_{6,7,8} )
33 +
34 +inherit distutils-r1
35 +
36 +DESCRIPTION="Implements CORS support for aiohttp asyncio-powered asynchronous HTTP server"
37 +HOMEPAGE="https://github.com/aio-libs/aiohttp-cors"
38 +SRC_URI="https://github.com/aio-libs/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
39 +
40 +LICENSE="Apache-2.0"
41 +SLOT="0"
42 +KEYWORDS="~amd64 ~x86"
43 +
44 +RDEPEND=">=dev-python/aiohttp-1.1.1[${PYTHON_USEDEP}]"
45 +BDEPEND="
46 + test? (
47 + dev-python/pytest-aiohttp[${PYTHON_USEDEP}]
48 + dev-python/selenium[${PYTHON_USEDEP}]
49 + )"
50 +
51 +distutils_enable_tests pytest
52 +
53 +# https://github.com/aio-libs/aiohttp-cors/pull/278
54 +PATCHES=(
55 + "${FILESDIR}/${P}-tests.patch"
56 + "${FILESDIR}/${P}-py3_7.patch"
57 +)
58 +
59 +src_prepare() {
60 + sed -i -e '/^addopts=/d' setup.cfg || die
61 + echo " ignore::DeprecationWarning" >> pytest.ini
62 + distutils-r1_src_prepare
63 +}
64
65 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
66 new file mode 100644
67 index 00000000000..9a461082409
68 --- /dev/null
69 +++ b/dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-py3_7.patch
70 @@ -0,0 +1,23 @@
71 +From e64b95848f3253157d831f4934841fceeaf9b2e3 Mon Sep 17 00:00:00 2001
72 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@×××××××.cz>
73 +Date: Thu, 14 Nov 2019 12:54:47 +0100
74 +Subject: [PATCH] Test instance type by isinstance, not issubclass
75 +
76 +https://github.com/aio-libs/aiohttp-cors/pull/278
77 +Fixes https://github.com/aio-libs/aiohttp-cors/issues/277
78 +---
79 + tests/unit/test_cors_config.py | 2 +-
80 + 1 file changed, 1 insertion(+), 1 deletion(-)
81 +
82 +diff --git a/tests/unit/test_cors_config.py b/tests/unit/test_cors_config.py
83 +index 817410e..d494e20 100644
84 +--- a/tests/unit/test_cors_config.py
85 ++++ b/tests/unit/test_cors_config.py
86 +@@ -103,7 +103,7 @@ def test_static_resource(app, cors):
87 + "/file", "/", name="dynamic_named_route")
88 + assert len(app.router.keys()) == 1
89 + for resource in list(app.router.resources()):
90 +- if issubclass(resource, web.StaticResource):
91 ++ if isinstance(resource, web.StaticResource):
92 + cors.add(resource)
93 + assert len(app.router.keys()) == 1
94
95 diff --git a/dev-python/aiohttp-cors/metadata.xml b/dev-python/aiohttp-cors/metadata.xml
96 index 90e51cd4878..a00e54b3e81 100644
97 --- a/dev-python/aiohttp-cors/metadata.xml
98 +++ b/dev-python/aiohttp-cors/metadata.xml
99 @@ -1,7 +1,14 @@
100 <?xml version="1.0" encoding="UTF-8"?>
101 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
102 <pkgmetadata>
103 - <!-- maintainer-needed -->
104 + <maintainer type="person">
105 + <email>onigino@××××××××××.com</email>
106 + <name>Gino McCarty</name>
107 + </maintainer>
108 + <maintainer type="project">
109 + <email>proxy-maint@g.o</email>
110 + <name>Proxy Maintainers</name>
111 + </maintainer>
112 <upstream>
113 <remote-id type="github">aio-libs/aiohttp-cors</remote-id>
114 </upstream>
115
116 diff --git a/profiles/package.mask b/profiles/package.mask
117 index 8fd5df9b721..2a8609c0e3e 100644
118 --- a/profiles/package.mask
119 +++ b/profiles/package.mask
120 @@ -837,7 +837,6 @@ dev-java/icedtea-web
121 # that's pending for a long time (bug #688016) but not aiohttp-cors dep.
122 #
123 # Removal in 30 days. Bug #712964.
124 -dev-python/aiohttp-cors
125 net-misc/gns3-converter
126 net-misc/gns3-gui
127 net-misc/gns3-server