From b8dfd70ff48a0955272648931912b516aed5fbf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=A9o=20Lohrer?= Date: Thu, 17 Jul 2025 15:58:43 +0200 Subject: [PATCH] fix: replace pkg_resources with importlib --- src/experimaestro/launcherfinder/registry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/experimaestro/launcherfinder/registry.py b/src/experimaestro/launcherfinder/registry.py index 77845acd..7c66fc9f 100644 --- a/src/experimaestro/launcherfinder/registry.py +++ b/src/experimaestro/launcherfinder/registry.py @@ -6,7 +6,7 @@ from pathlib import Path import typing from omegaconf import DictConfig, OmegaConf, SCMode -import pkg_resources +from importlib.metadata import entry_points from experimaestro.utils import logger from .base import ConnectorConfiguration, TokenConfiguration from .specs import HostRequirement, RequirementUnion @@ -75,10 +75,10 @@ def __init__(self, basepath: Path): self.find_launcher_fn = None # Use entry points for connectors and launchers - for entry_point in pkg_resources.iter_entry_points("experimaestro.connectors"): + for entry_point in entry_points(group="experimaestro.connectors"): entry_point.load().init_registry(self) - for entry_point in pkg_resources.iter_entry_points("experimaestro.tokens"): + for entry_point in entry_points(group="experimaestro.tokens"): entry_point.load().init_registry(self) # Register the find launcher function if it exists