Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Windows event loop hack in Python 3.8+ #34

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions colcon_parallel_executor/executor/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@ def execute(self, args, jobs, *, on_error=OnError.interrupt): # noqa: D102
return 1
finally:
# HACK on Windows closing the event loop seems to hang after Ctrl-C
# even though no futures are pending
if sys.platform != 'win32':
# even though no futures are pending, but appears fixed in py3.8
if sys.platform != 'win32' or sys.version_info >= (3, 8):
logger.debug('closing loop')
loop.close()
logger.debug('loop closed')
else:
logger.debug('skipping loop closure')
result = future.result()
logger.debug(
"run_until_complete finished with '{result}'".format_map(locals()))
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ filterwarnings =
ignore:pkg_resources is deprecated as an API::flake8_import_order
ignore:SelectableGroups dict interface is deprecated::flake8
ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated::pyreadline
# Suppress resource warnings pending investigation
always::ResourceWarning
junit_suite_name = colcon-parallel-executor

[options.entry_points]
Expand Down
Loading