Skip to content

Commit

Permalink
switch to new importlib.metadata API (#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
Helveg committed Jun 9, 2023
1 parent 2e7b833 commit db0f747
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bsb/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""


import pkg_resources
from importlib.metadata import entry_points
import errr
from .exceptions import PluginError
import types
Expand All @@ -20,7 +20,7 @@ def discover(category):
:rtype: dict
"""
registry = {}
for entry in pkg_resources.iter_entry_points("bsb." + category):
for entry in entry_points().get("bsb." + category, []):
try:
advert = entry.load()
if hasattr(advert, "__plugin__"):
Expand Down

0 comments on commit db0f747

Please sign in to comment.