ros2 / launch

Tools for launching multiple processes and for writing tests involving multiple processes.
Apache License 2.0
126 stars 144 forks source link

Fix remaining occurrences of "There is no current event loop" #723

Closed clalancette closed 1 year ago

clalancette commented 1 year ago

Depends on https://github.com/ros2/launch_ros/pull/372

To do that, we do 3 things:

  1. In places where we would have called asyncio.get_event_loop(), instead call osrf_pycommon.process_utils.get_loop(). Since the latter is already suppressing the warning, the warning will be quieted there.
  2. Add some additional warning filters (in the tests) to catch the "There is no current event loop" warning. These will go away when we update to Python >= 3.11
  3. Remove the create_future_impl utility. That was only needed for compatibility with Python < 3.6, which we have no instances of anymore. This particular change also requires a change to launch_ros.

With these changes in place, there are no more warnings coming from the launch tests.

clalancette commented 1 year ago

CI: