This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brett.cannon
Recipients brett.cannon, eric.snow, ncoghlan, tkhyn
Date 2017-05-24.19:41:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Here is why Python does when importing a module that lacks __path__:

>>> import importlib
>>> del importlib.__path__
>>> import importlib.util
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'importlib.util'; 'importlib' is not a package

So yes, we should change find_spec() to raise ModuleNotFoundError to match (although only in Python 3.7 since this is a breaking change).
Date User Action Args
2017-05-24 19:41:17brett.cannonsetrecipients: + brett.cannon, ncoghlan, eric.snow, tkhyn
2017-05-24 19:41:17brett.cannonsetmessageid: <>
2017-05-24 19:41:17brett.cannonlinkissue30436 messages
2017-05-24 19:41:17brett.cannoncreate