diff options
author | 2020-04-19 19:00:20 -0700 | |
---|---|---|
committer | 2020-05-03 19:33:49 -0700 | |
commit | a46e470635d458aca5e3c4c8c7b9309a34d06ec9 (patch) | |
tree | 5efc0a94e32e101f73ca30ccbfed2e809cd471e7 | |
parent | net-vpn/openvpn: drop vulnerable (diff) | |
download | gentoo-a46e470635d458aca5e3c4c8c7b9309a34d06ec9.tar.gz gentoo-a46e470635d458aca5e3c4c8c7b9309a34d06ec9.tar.bz2 gentoo-a46e470635d458aca5e3c4c8c7b9309a34d06ec9.zip |
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@protonmail.com>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r-- | dev-python/aiohttp-cors/aiohttp-cors-0.7.0-r1.ebuild | 37 | ||||
-rw-r--r-- | dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-py3_7.patch | 23 | ||||
-rw-r--r-- | dev-python/aiohttp-cors/metadata.xml | 9 | ||||
-rw-r--r-- | 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 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?= <miro@hroncok.cz> +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 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <!-- maintainer-needed --> + <maintainer type="person"> + <email>onigino@protonmail.com</email> + <name>Gino McCarty</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</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 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 |