Skip to content

Commit f3e911c

Browse files
committed
Resolve SelectableGroups deprecation warning, using approach used to resolve ros2/ros2#1254 by clalancette.
Signed-off-by: veronica.knisley <[email protected]>
1 parent b8a5adc commit f3e911c

File tree

1 file changed

+6
-1
lines changed
  • launch_ros/launch_ros/descriptions

1 file changed

+6
-1
lines changed

launch_ros/launch_ros/descriptions/node.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,13 @@ def instantiate_extension(
446446

447447
def get_extensions(logger):
448448
group_name = 'launch_ros.node_action'
449+
entry_points_impl = importlib_metadata.entry_points()
450+
if hasattr(entry_points_impl, 'select'):
451+
groups = entry_points_impl.select(group=group_name)
452+
else:
453+
groups = entry_points_impl.get(group_name, [])
449454
entry_points = {}
450-
for entry_point in importlib_metadata.entry_points().get(group_name, []):
455+
for entry_point in groups:
451456
entry_points[entry_point.name] = entry_point
452457
extension_types = {}
453458
for entry_point in entry_points:

0 commit comments

Comments
 (0)