diff options
author | Andrew Ammerlaan <andrewammerlaan@riseup.net> | 2020-03-31 21:57:14 +0200 |
---|---|---|
committer | Andrew Ammerlaan <andrewammerlaan@riseup.net> | 2020-03-31 21:57:14 +0200 |
commit | 41f57b145a777f4f247b1ad541f663d50c081a0a (patch) | |
tree | 1d32b6126e8d1d58c916af811533d124dc2c9d2b | |
parent | dev-python/aiohttp-cors: treecleaned package (diff) | |
download | guru-41f57b14.tar.gz guru-41f57b14.tar.bz2 guru-41f57b14.zip |
dev-python/aiohttp-cors: add patch for py3_7
https://github.com/aio-libs/aiohttp-cors/pull/278
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
-rw-r--r-- | dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild | 7 | ||||
-rw-r--r-- | dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-py3_7.patch | 22 |
2 files changed, 26 insertions, 3 deletions
diff --git a/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild index bcc29302a..4e87a24f5 100644 --- a/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild +++ b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild @@ -3,14 +3,13 @@ EAPI=7 -PYTHON_COMPAT=( python3_6 ) +PYTHON_COMPAT=( python3_{6,7} ) 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" -EGIT_REPO_URI="https://github.com/aio-libs/aiohttp-cors" LICENSE="Apache-2.0" SLOT="0" @@ -25,8 +24,10 @@ BDEPEND=" distutils_enable_tests pytest +# https://github.com/aio-libs/aiohttp-cors/pull/278 PATCHES=( - "${FILESDIR}"/aiohttp-cors-0.7.0-tests.patch + "${FILESDIR}/${P}-tests.patch" + "${FILESDIR}/${P}-py3_7.patch" ) 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 000000000..e09119c85 --- /dev/null +++ b/dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-py3_7.patch @@ -0,0 +1,22 @@ +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 + +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 |