From 6b18432cfea5a28ff337ccd6a9d480b0bd88ec4d Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Thu, 22 Jan 2026 11:37:19 +0100 Subject: [PATCH] pick-ui: update for python 3.14 support ``` Traceback (most recent call last): File "bin/pick-ui.py", line 31, in loop = urwid.MainLoop(u.render(), PALETTE, event_loop=evl, handle_mouse=False) ~~~~~~~~^^ File "bin/pick/ui.py", line 196, in render asyncio.ensure_future(self.update()) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^ File "/usr/lib64/python3.14/asyncio/tasks.py", line 730, in ensure_future loop = events.get_event_loop() File "/usr/lib64/python3.14/asyncio/events.py", line 715, in get_event_loop raise RuntimeError('There is no current event loop in thread %r.' % threading.current_thread().name) RuntimeError: There is no current event loop in thread 'MainThread'. ``` Of the 3 dependencies, only urwid actually needs to be updated, but while at it let's pick the latest of each. Cc: mesa-stable (cherry picked from commit 21829c9f7ef98fb2d0b1617833e4538679d2c756) Part-of: --- .pick_status.json | 2 +- bin/pick-ui.py | 4 +++- bin/pick/requirements.txt | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 9ba90a597ad..6d791f89a69 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -614,7 +614,7 @@ "description": "pick-ui: update for python 3.14 support", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/bin/pick-ui.py b/bin/pick-ui.py index 24613880b90..12288114257 100755 --- a/bin/pick-ui.py +++ b/bin/pick-ui.py @@ -27,7 +27,9 @@ from pick.ui import UI, PALETTE if __name__ == "__main__": u = UI() - evl = urwid.AsyncioEventLoop(loop=asyncio.new_event_loop()) + asyncio_loop = asyncio.new_event_loop() + asyncio.set_event_loop(asyncio_loop) + evl = urwid.AsyncioEventLoop(loop=asyncio_loop) loop = urwid.MainLoop(u.render(), PALETTE, event_loop=evl, handle_mouse=False) u.mainloop = loop loop.run() diff --git a/bin/pick/requirements.txt b/bin/pick/requirements.txt index 75754a50e89..c520cae7d45 100644 --- a/bin/pick/requirements.txt +++ b/bin/pick/requirements.txt @@ -1,3 +1,3 @@ -attrs==23.1.0 -packaging==25.0 -urwid==2.1.2 +attrs==25.4.0 +packaging==26.0 +urwid==3.0.3