Skip to content

Commit

Permalink
dev-python/aiohttp-cors: bump to python3.8
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
  • Loading branch information
Alessandro-Barbieri committed Apr 25, 2020
1 parent 2db41d8 commit 7406ddd
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions dev-python/aiohttp-cors/aiohttp-cors-0.7.0-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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
distutils-r1_src_prepare
}

4 comments on commit 7406ddd

@AndrewAmmerlaan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test fail with py3_8 for me: ERROR tests/unit/test_cors_config.py - DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead

Are you sure we should add py3_8 here?

@Alessandro-Barbieri
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverting

@Alessandro-Barbieri
Copy link
Contributor Author

@Alessandro-Barbieri Alessandro-Barbieri commented on 7406ddd Apr 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or should we restrict the tests?
aio-libs/aiohttp-cors#280
psf/black#1365

@AndrewAmmerlaan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or should we restrict the tests?
aio-libs/aiohttp-cors#280
psf/black#1365

That depends on if the package itself works with py3_8. However, considering that aiohttp-cors does not even officially support py3_7 yet, I expect that it won't work with py3_8 either.

Please sign in to comment.