Nick Coghlan <ncogh...@gmail.com> added the comment:

The two errors mean different things: ModuleNotFoundError means literally that 
the module could not be found at all (i.e. no import hook offered to try to 
load it)

A plain ImportError then means that the module was located, but attempting to 
actually load it failed.

find_spec()/find_loader()/find_module() implementations on import plugins 
shouldn't be raising exceptions for modules they don't offer, and hence 
shouldn't be needing to raise ModuleNotFoundError directly.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35486>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to