Skip to content

Commit

Permalink
Use default event loop on Windows in Python 3.8 (#574)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cottsay committed Aug 17, 2023
1 parent b21dd93 commit 52b0078
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion colcon_core/subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 52b0078

Please sign in to comment.