fix(event): suppress native asyncio.QueueShutDown on Python 3.13+#6773
fix(event): suppress native asyncio.QueueShutDown on Python 3.13+#6773axelray-dev wants to merge 1 commit into
Conversation
Greptile SummaryThis PR fixes a silent error during normal shutdown on Python 3.13+ where
Confidence Score: 5/5Safe to merge — the change is narrowly scoped to exception handling during queue shutdown and has no effect on the happy path. Both changed sites have a clear before/after: the No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "fix(event): suppress native asyncio.Queu..." | Re-trigger Greptile |
Summary
On Python 3.13+,
asyncio.Queue.shutdown()makesqueue.get()raise the stdlibasyncio.QueueShutDown. EventProcessor only suppressed a local subclass of that exception, so the native instance was treated as an unexpected processor error and could emit error logs/telemetry during normal stop.Changes
asyncio.QueueShutDown(when present) in_process_queueandstop.QueueShutDownfallback for artificial raises.Verification
uv run pytest tests/units/reflex_base/event/processor/test_event_processor.py -q(37 passed)Backwards compatibility
No public API change. Pre-3.13 behavior unchanged. Stop still drains and cancels as before; only expected shutdown exceptions are ignored correctly.
Fixes #6756