G5: F19 — replace deprecated get_event_loop with get_running_loop

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
This commit is contained in:
Matthew Wolter 2026-04-12 03:57:20 -07:00
parent b4cd5840ab
commit 1b404221a2

View file

@ -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()