Skip to content

Commit 42bfd78

Browse files
committed
WIP: Add name parameter to PluginManager.load_setuptools_entrypoints
Related to pytest-dev/pytest#4727
1 parent cfba99d commit 42bfd78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pluggy/manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def check_pending(self):
251251
% (name, hookimpl.plugin),
252252
)
253253

254-
def load_setuptools_entrypoints(self, entrypoint_name):
254+
def load_setuptools_entrypoints(self, entrypoint_name, name=None):
255255
""" Load modules from querying the specified setuptools entrypoint name.
256256
Return the number of loaded plugins. """
257257
from pkg_resources import (
@@ -260,7 +260,7 @@ def load_setuptools_entrypoints(self, entrypoint_name):
260260
VersionConflict,
261261
)
262262

263-
for ep in iter_entry_points(entrypoint_name):
263+
for ep in iter_entry_points(entrypoint_name, name=name):
264264
# is the plugin registered or blocked?
265265
if self.get_plugin(ep.name) or self.is_blocked(ep.name):
266266
continue

0 commit comments

Comments
 (0)