diff --git a/pyproject.toml b/pyproject.toml index 420abd8..2f5db02 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,8 +19,7 @@ requires-python = ">3.8" dependencies = [ "omero-py>=5.8", - "entrypoints", - "types-entrypoints", + "importlib-metadata", "future", "rdflib", "pyld", diff --git a/src/omero_rdf/__init__.py b/src/omero_rdf/__init__.py index 3bf69ab..9f8c84b 100644 --- a/src/omero_rdf/__init__.py +++ b/src/omero_rdf/__init__.py @@ -28,7 +28,7 @@ from functools import wraps from typing import Any, Callable, Dict, Generator, List, Optional, Set, Tuple, Union -import entrypoints +from importlib.metadata import entry_points from omero.cli import BaseControl, Parser, ProxyStringType from omero.gateway import BlitzGateway, BlitzObjectWrapper from omero.model import Dataset, Image, IObject, Plate, Project, Screen @@ -318,7 +318,8 @@ def descending(self): def load_handlers(self) -> Handlers: annotation_handlers: Handlers = [] - for ep in entrypoints.get_group_all("omero_rdf.annotation_handler"): + eps = entry_points() + for ep in eps.get("omero_rdf.annotation_handler", []): ah_loader = ep.load() annotation_handlers.append(ah_loader(self)) # We know there are some built in handlers