mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-python/urwid: enable py3.11
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
26
dev-python/urwid/files/urwid-2.1.2-fix-py3.11.patch
Normal file
26
dev-python/urwid/files/urwid-2.1.2-fix-py3.11.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
https://github.com/urwid/urwid/pull/517
|
||||
From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= <mail@dotlambda.de>
|
||||
Date: Fri, 20 Jan 2023 11:37:15 -0800
|
||||
Subject: [PATCH] make tests compatible with Python 3.11
|
||||
|
||||
--- a/urwid/tests/test_event_loops.py
|
||||
+++ b/urwid/tests/test_event_loops.py
|
||||
@@ -201,15 +201,14 @@ def test_error(self):
|
||||
evl.alarm(0.5, lambda: 1 / 0) # Simulate error in event loop
|
||||
self.assertRaises(ZeroDivisionError, evl.run)
|
||||
|
||||
- def test_coroutine_error(self):
|
||||
+ async def test_coroutine_error(self):
|
||||
evl = self.evl
|
||||
|
||||
- @asyncio.coroutine
|
||||
- def error_coro():
|
||||
+ async def error_coro():
|
||||
result = 1 / 0 # Simulate error in coroutine
|
||||
yield result
|
||||
|
||||
- asyncio.ensure_future(error_coro())
|
||||
+ asyncio.ensure_future(await error_coro())
|
||||
self.assertRaises(ZeroDivisionError, evl.run)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{9..10} )
|
||||
PYTHON_COMPAT=( python3_{9..11} )
|
||||
PYTHON_REQ_USE="ncurses"
|
||||
inherit distutils-r1 optfeature
|
||||
|
||||
@@ -24,6 +24,11 @@ IUSE="examples"
|
||||
distutils_enable_sphinx docs
|
||||
distutils_enable_tests setup.py
|
||||
|
||||
PATCHES=(
|
||||
# https://github.com/urwid/urwid/pull/517
|
||||
"${FILESDIR}/${P}-fix-py3.11.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
# optional tests broken by modern tornado versions
|
||||
sed -e 's:import tornado:&_broken:' \
|
||||
|
||||
Reference in New Issue
Block a user