Summary
wait_for_text() in server.py uses asyncio.get_event_loop() which is deprecated since Python 3.10 and emits a DeprecationWarning in Python 3.12+. It will eventually be removed.
Current code
loop = asyncio.get_event_loop()
deadline = loop.time() + timeout
Fix
loop = asyncio.get_running_loop()
deadline = loop.time() + timeout
Since wait_for_text is an async function, there is always a running event loop when it executes, so get_running_loop() is the correct replacement.
Size
XS — single line change.
Summary
wait_for_text()inserver.pyusesasyncio.get_event_loop()which is deprecated since Python 3.10 and emits aDeprecationWarningin Python 3.12+. It will eventually be removed.Current code
Fix
Since
wait_for_textis anasyncfunction, there is always a running event loop when it executes, soget_running_loop()is the correct replacement.Size
XS — single line change.