Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ packages = find:
package_dir =
= src

# minimum dependencies.
install_requires =
setuptools

# Disabled because it does not work in CentOS 8.
# [options.data_files]
# share/man/man1 =
Expand Down
6 changes: 4 additions & 2 deletions src/anyconfig/processors/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import typing
import warnings

import pkg_resources
import importlib.metadata

from .. import common, ioinfo, models, utils
from .datatypes import (
Expand Down Expand Up @@ -241,7 +241,9 @@ def load_plugins(pgroup: str) -> typing.Iterator[ProcClsT]:

:param pgroup: A string represents plugin type, e.g. anyconfig_backends
"""
for res in pkg_resources.iter_entry_points(pgroup):
eps = importlib.metadata.entry_points()
for res in (eps.get(pgroup, []) if isinstance(eps, dict)
else eps.select(group=pgroup)):
try:
yield res.load()
except ImportError as exc:
Expand Down