Message294383
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:17 | brett.cannon | set | recipients:
+ brett.cannon, ncoghlan, eric.snow, tkhyn |
2017-05-24 19:41:17 | brett.cannon | set | messageid: <1495654877.84.0.256026357326.issue30436@psf.upfronthosting.co.za> |
2017-05-24 19:41:17 | brett.cannon | link | issue30436 messages |
2017-05-24 19:41:17 | brett.cannon | create | |
|