bin/pick-ui: use asyncio.new_event_loop

Instead of .get_event_loop, which is deprecated when there isn't a
running loop (like in our case).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23472>
This commit is contained in:
Dylan Baker 2023-04-20 16:02:16 -07:00 committed by Marge Bot
parent 0630a599fc
commit bea9111749

View File

@ -27,7 +27,7 @@ from pick.ui import UI, PALETTE
if __name__ == "__main__":
u = UI()
evl = urwid.AsyncioEventLoop(loop=asyncio.get_event_loop())
evl = urwid.AsyncioEventLoop(loop=asyncio.new_event_loop())
loop = urwid.MainLoop(u.render(), PALETTE, event_loop=evl, handle_mouse=False)
u.mainloop = loop
loop.run()