From 1b404221a267674f16ed978cb9c7f04a29934368 Mon Sep 17 00:00:00 2001 From: Matthew Wolter Date: Sun, 12 Apr 2026 03:57:20 -0700 Subject: [PATCH] =?UTF-8?q?G5:=20F19=20=E2=80=94=20replace=20deprecated=20?= =?UTF-8?q?get=5Fevent=5Floop=20with=20get=5Frunning=5Floop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Why: asyncio.get_event_loop() inside an async function emits DeprecationWarning since Python 3.10 and raises in some contexts on Python 3.12+. The call in CommandHandlerBase.send() is always inside a running async context where get_running_loop() is the correct API. Refs: Forensics report finding F19 --- src/meshcore/commands/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meshcore/commands/base.py b/src/meshcore/commands/base.py index 6831ad4..8983eed 100644 --- a/src/meshcore/commands/base.py +++ b/src/meshcore/commands/base.py @@ -185,7 +185,7 @@ class CommandHandlerBase: futures: List[asyncio.Future] = [] subscriptions = [] - loop = asyncio.get_event_loop() + loop = asyncio.get_running_loop() for event_type in expected_events: future = loop.create_future()