From 361281fdd1a9f98c39bdddd2ac481071fddb8cfe Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Wed, 9 Aug 2023 19:17:31 -0500 Subject: [PATCH] Use default event loop on Windows in Python 3.8 In Python 3.8 and newer, the default event loop on Windows is the ProactorEventLoop, so there's no reason to specifically create one here. We can drop this conditional entirely when we drop Python 3.7 support. --- colcon_core/subprocess.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/colcon_core/subprocess.py b/colcon_core/subprocess.py index 05576cb5..2786c19f 100644 --- a/colcon_core/subprocess.py +++ b/colcon_core/subprocess.py @@ -37,7 +37,8 @@ def new_event_loop(): :returns: The created event loop """ - if sys.platform == 'win32': + # TODO: Drop this along with py3.7 + if sys.platform == 'win32' and sys.version_info < (3, 8): return asyncio.ProactorEventLoop() return asyncio.new_event_loop()