From a46e470635d458aca5e3c4c8c7b9309a34d06ec9 Mon Sep 17 00:00:00 2001 From: Gino McCarty Date: Sun, 19 Apr 2020 19:00:20 -0700 Subject: 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 Signed-off-by: Zac Medico --- .../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(-) create mode 100644 dev-python/aiohttp-cors/aiohttp-cors-0.7.0-r1.ebuild create mode 100644 dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-py3_7.patch 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 000000000000..eded3a043888 --- /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 000000000000..9a4610824099 --- /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?= +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 90e51cd48781..a00e54b3e81f 100644 --- a/dev-python/aiohttp-cors/metadata.xml +++ b/dev-python/aiohttp-cors/metadata.xml @@ -1,7 +1,14 @@ - + + onigino@protonmail.com + Gino McCarty + + + proxy-maint@gentoo.org + Proxy Maintainers + aio-libs/aiohttp-cors diff --git a/profiles/package.mask b/profiles/package.mask index 8fd5df9b721f..2a8609c0e3e4 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 -- cgit v1.2.3-65-gdbad