diff --git a/plux/__init__.py b/plux/__init__.py index ff8b4a7..3707ff7 100644 --- a/plux/__init__.py +++ b/plux/__init__.py @@ -17,7 +17,7 @@ name = "plux" -__version__ = "1.9.0" +__version__ = "1.10.0.dev2" __all__ = [ "FunctionPlugin", diff --git a/plux/runtime/resolve.py b/plux/runtime/resolve.py index cb2feb8..8e7df42 100644 --- a/plux/runtime/resolve.py +++ b/plux/runtime/resolve.py @@ -1,5 +1,5 @@ -"""Tools to resolve PluginSpec instances from entry points at runtime. Currently, stevedore does most of the heavy -lifting for us here (it caches entrypoints and can load them quickly).""" +"""Tools to resolve PluginSpec instances from entry points at runtime. The primary mechanism we use to do +that is ``importlib.metadata`` and a bit of caching.""" import logging import typing as t @@ -15,7 +15,7 @@ class MetadataPluginFinder(PluginFinder): """ - This is a simple implementation of a PluginFinder that uses ``importlib.metadata`` directly, without caching, to resolve plugins. It also automatically follows `entry_point + This is a simple implementation of a PluginFinder that uses by default the ``EntryPointsCache`` singleton. """ def __init__( @@ -33,7 +33,7 @@ def __init__( def find_plugins(self) -> t.List[PluginSpec]: specs = [] - finds = self.entry_points_resolver.get_entry_points().get(self.namespace) + finds = self.entry_points_resolver.get_entry_points().get(self.namespace, []) for ep in finds: specs.append(self.to_plugin_spec(ep)) return specs