diff --git a/fix-test-failure-due-to-python11.patch b/fix-test-failure-due-to-python11.patch new file mode 100644 index 0000000..e1159de --- /dev/null +++ b/fix-test-failure-due-to-python11.patch @@ -0,0 +1,19 @@ +--- urwid-2.1.2.orig/urwid/tests/test_event_loops.py ++++ urwid-2.1.2/urwid/tests/test_event_loops.py +@@ -201,15 +201,14 @@ else: + 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) diff --git a/python-urwid.spec b/python-urwid.spec index c5f4efd..cd40902 100644 --- a/python-urwid.spec +++ b/python-urwid.spec @@ -1,12 +1,13 @@ Name: python-urwid Version: 2.1.2 -Release: 4 +Release: 5 Summary: Console user interface library License: LGPLv2+ URL: http://excess.org/urwid/ Source0: https://pypi.python.org/packages/source/u/urwid/urwid-%{version}.tar.gz Patch0: fix-use-trio-lowlevel-instead-of-trio.patch Patch1: Add-script-for-detecting-character-widths-and-dumping-width-tables.patch +Patch2: fix-test-failure-due-to-python11.patch %description Urwid is a console user interface library for Python. It includes @@ -42,6 +43,9 @@ PYTHON=%{__python3} %{__python3} setup.py test %{python3_sitearch}/urwid-%{version}*.egg-info %changelog +* Sat Jul 22 2023 xu_ping<707078654@qq.com> - 2.1.2-5 +- fix test failure due to python11 + * Tue Jan 17 2023 zhangliangpengkun - 2.1.2-4 - Add-script-for-detecting-character-widths-and-dumping-width-tables.patch