commit:     a46e470635d458aca5e3c4c8c7b9309a34d06ec9
Author:     Gino McCarty <onigino <AT> protonmail <DOT> com>
AuthorDate: Mon Apr 20 02:00:20 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon May  4 02:33:49 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a46e4706

dev-python/aiohttp-cors: Revision for python 3.7 support

Bug: https://bugs.gentoo.org/712964
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Gino McCarty <onigino <AT> protonmail.com>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 .../aiohttp-cors/aiohttp-cors-0.7.0-r1.ebuild      | 37 ++++++++++++++++++++++
 .../files/aiohttp-cors-0.7.0-py3_7.patch           | 23 ++++++++++++++
 dev-python/aiohttp-cors/metadata.xml               |  9 +++++-
 profiles/package.mask                              |  1 -
 4 files changed, 68 insertions(+), 2 deletions(-)

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
new file mode 100644
index 00000000000..eded3a04388
--- /dev/null
+++ b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+inherit distutils-r1
+
+DESCRIPTION="Implements CORS support for aiohttp asyncio-powered asynchronous 
HTTP server"
+HOMEPAGE="https://github.com/aio-libs/aiohttp-cors";
+SRC_URI="https://github.com/aio-libs/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND=">=dev-python/aiohttp-1.1.1[${PYTHON_USEDEP}]"
+BDEPEND="
+       test? (
+               dev-python/pytest-aiohttp[${PYTHON_USEDEP}]
+               dev-python/selenium[${PYTHON_USEDEP}]
+       )"
+
+distutils_enable_tests pytest
+
+# https://github.com/aio-libs/aiohttp-cors/pull/278
+PATCHES=(
+       "${FILESDIR}/${P}-tests.patch"
+       "${FILESDIR}/${P}-py3_7.patch"
+)
+
+src_prepare() {
+       sed -i -e '/^addopts=/d' setup.cfg || die
+       echo "    ignore::DeprecationWarning" >> pytest.ini
+       distutils-r1_src_prepare
+}

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
new file mode 100644
index 00000000000..9a461082409
--- /dev/null
+++ b/dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-py3_7.patch
@@ -0,0 +1,23 @@
+From e64b95848f3253157d831f4934841fceeaf9b2e3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <[email protected]>
+Date: Thu, 14 Nov 2019 12:54:47 +0100
+Subject: [PATCH] Test instance type by isinstance, not issubclass
+
+https://github.com/aio-libs/aiohttp-cors/pull/278
+Fixes https://github.com/aio-libs/aiohttp-cors/issues/277
+---
+ tests/unit/test_cors_config.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/unit/test_cors_config.py b/tests/unit/test_cors_config.py
+index 817410e..d494e20 100644
+--- a/tests/unit/test_cors_config.py
++++ b/tests/unit/test_cors_config.py
+@@ -103,7 +103,7 @@ def test_static_resource(app, cors):
+         "/file", "/", name="dynamic_named_route")
+     assert len(app.router.keys()) == 1
+     for resource in list(app.router.resources()):
+-        if issubclass(resource, web.StaticResource):
++        if isinstance(resource, web.StaticResource):
+             cors.add(resource)
+     assert len(app.router.keys()) == 1

diff --git a/dev-python/aiohttp-cors/metadata.xml 
b/dev-python/aiohttp-cors/metadata.xml
index 90e51cd4878..a00e54b3e81 100644
--- a/dev-python/aiohttp-cors/metadata.xml
+++ b/dev-python/aiohttp-cors/metadata.xml
@@ -1,7 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
 <pkgmetadata>
-       <!-- maintainer-needed -->
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Gino McCarty</name>
+       </maintainer>
+       <maintainer type="project">
+               <email>[email protected]</email>
+               <name>Proxy Maintainers</name>
+       </maintainer>
        <upstream>
                <remote-id type="github">aio-libs/aiohttp-cors</remote-id>
        </upstream>

diff --git a/profiles/package.mask b/profiles/package.mask
index 8fd5df9b721..2a8609c0e3e 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -837,7 +837,6 @@ dev-java/icedtea-web
 # that's pending for a long time (bug #688016) but not aiohttp-cors dep.
 #
 # Removal in 30 days.  Bug #712964.
-dev-python/aiohttp-cors
 net-misc/gns3-converter
 net-misc/gns3-gui
 net-misc/gns3-server

Reply via email to