From 27713707149fa6fdd23a9b1f003b691017ba456e Mon Sep 17 00:00:00 2001 From: kkaris Date: Tue, 6 Aug 2024 15:30:51 -0700 Subject: [PATCH] Try replacing pkg_resources.iter_entry_points with importlib.metadata.entry_points --- src/pyobo/xrefdb/sources/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pyobo/xrefdb/sources/__init__.py b/src/pyobo/xrefdb/sources/__init__.py index c0a685bb..8f97391b 100644 --- a/src/pyobo/xrefdb/sources/__init__.py +++ b/src/pyobo/xrefdb/sources/__init__.py @@ -7,7 +7,7 @@ from typing import Callable, Iterable, Mapping, Optional import pandas as pd -from pkg_resources import iter_entry_points +from importlib.metadata import entry_points from tqdm.auto import tqdm __all__ = [ @@ -22,7 +22,7 @@ @lru_cache() def _get_xref_plugins() -> Mapping[str, Callable[[], pd.DataFrame]]: - return {entry.name: entry.load() for entry in iter_entry_points(group="pyobo.xrefs")} + return {entry.name: entry.load() for entry in entry_points(group="pyobo.xrefs")} def has_xref_plugin(prefix: str) -> bool: