File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -493,7 +493,8 @@ def check_pending(self):
493
493
def load_setuptools_entrypoints (self , entrypoint_name ):
494
494
""" Load modules from querying the specified setuptools entrypoint name.
495
495
Return the number of loaded plugins. """
496
- from pkg_resources import iter_entry_points , DistributionNotFound
496
+ from pkg_resources import (iter_entry_points , DistributionNotFound ,
497
+ VersionConflict )
497
498
for ep in iter_entry_points (entrypoint_name ):
498
499
# is the plugin registered or blocked?
499
500
if self .get_plugin (ep .name ) or self .is_blocked (ep .name ):
@@ -502,6 +503,9 @@ def load_setuptools_entrypoints(self, entrypoint_name):
502
503
plugin = ep .load ()
503
504
except DistributionNotFound :
504
505
continue
506
+ except VersionConflict as e :
507
+ raise PluginValidationError (
508
+ "Plugin %r could not be loaded: %s!" % (ep .name , e ))
505
509
self .register (plugin , name = ep .name )
506
510
self ._plugin_distinfo .append ((plugin , ep .dist ))
507
511
return len (self ._plugin_distinfo )
You can’t perform that action at this time.
0 commit comments