From 577ee2295db025f631ebdfd7e4d0ae90ccacac9e Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Mon, 20 Jul 2020 12:11:19 +0200 Subject: dev-python/uvloop: Port up to py3.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- .../files/uvloop-0.14.0-asyncio-test-hang.patch | 33 ++++++++++++++++++++++ dev-python/uvloop/uvloop-0.14.0.ebuild | 10 +++++-- 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 dev-python/uvloop/files/uvloop-0.14.0-asyncio-test-hang.patch diff --git a/dev-python/uvloop/files/uvloop-0.14.0-asyncio-test-hang.patch b/dev-python/uvloop/files/uvloop-0.14.0-asyncio-test-hang.patch new file mode 100644 index 000000000000..d139d6f66b0b --- /dev/null +++ b/dev-python/uvloop/files/uvloop-0.14.0-asyncio-test-hang.patch @@ -0,0 +1,33 @@ +From 1549514de9c344ac978472097e750b1caf6a36b9 Mon Sep 17 00:00:00 2001 +From: Fantix King +Date: Mon, 25 May 2020 14:10:07 -0500 +Subject: [PATCH] Skip for bpo-30064 until 3.8.2 + +[mgorny: extended to all py3.8 versions] +--- + tests/test_sockets.py | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/tests/test_sockets.py b/tests/test_sockets.py +index 6a8a63f..d9f258e 100644 +--- a/tests/test_sockets.py ++++ b/tests/test_sockets.py +@@ -194,10 +194,11 @@ class _TestSockets: + self.loop.run_until_complete(asyncio.sleep(0.01)) + + def test_sock_cancel_add_reader_race(self): +- if self.is_asyncio_loop() and sys.version_info[:3] == (3, 8, 0): +- # asyncio 3.8.0 seems to have a regression; +- # tracked in https://bugs.python.org/issue30064 +- raise unittest.SkipTest() ++ if self.is_asyncio_loop(): ++ if (3, 9) > sys.version_info[:3] >= (3, 8, 0): ++ # asyncio 3.8.0 seems to have a regression; ++ # tracked in https://bugs.python.org/issue30064 ++ raise unittest.SkipTest() + + srv_sock_conn = None + +-- +2.27.0 + diff --git a/dev-python/uvloop/uvloop-0.14.0.ebuild b/dev-python/uvloop/uvloop-0.14.0.ebuild index 0c4b130beda0..2cafc6be0842 100644 --- a/dev-python/uvloop/uvloop-0.14.0.ebuild +++ b/dev-python/uvloop/uvloop-0.14.0.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python{3_6,3_7} ) +PYTHON_COMPAT=( python3_{6..8} ) inherit distutils-r1 DESCRIPTION="Ultra-fast implementation of asyncio event loop on top of libuv" @@ -19,7 +19,6 @@ RESTRICT="!test? ( test )" RDEPEND=">=dev-libs/libuv-1.11.0:=" DEPEND=" ${RDEPEND} - dev-python/setuptools[${PYTHON_USEDEP}] doc? ( >=dev-python/alabaster-0.6.2[${PYTHON_USEDEP}] dev-python/sphinx[${PYTHON_USEDEP}] @@ -30,6 +29,10 @@ DEPEND=" ) " +PATCHES=( + "${FILESDIR}"/${P}-asyncio-test-hang.patch +) + python_prepare_all() { cat <> setup.cfg || die [build_ext] @@ -39,6 +42,9 @@ EOF # flake8 only rm tests/test_sourcecode.py || die + sed -i -e 's:test_write_to_closed_transport:_&:' \ + tests/test_tcp.py || die + distutils-r1_python_prepare_all } -- cgit v1.2.3-65-gdbad