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