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.

classification
Title: pkgutil.find_loader raises an ImportError on PEP 420 implicit namespace packages
Type: behavior Stage:
Components: Interpreter Core Versions: Python 3.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: alynn, eric.smith, eric.snow
Priority: normal Keywords:

Created on 2015-02-03 17:55 by alynn, last changed 2022-04-11 14:58 by admin.

Messages (2)
msg235357 - (view) Author: Alistair Lynn (alynn) Date: 2015-02-03 17:55
The documentation states that __spec__ is None in–and only in–__main__. That this happens also for PEP 420 implicit namespace packages appears to be the cause of the error.
msg235374 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2015-02-04 06:08
Hmm. If I recall correctly, we set __spec__ for namespace packages...  What's a quick way to consistently reproduce the ImportError?
History
Date User Action Args
2022-04-11 14:58:12adminsetgithub: 67578
2020-05-22 18:22:30brett.cannonsetnosy: - brett.cannon
2018-07-11 07:38:15serhiy.storchakasettype: crash -> behavior
2015-02-04 17:48:26brett.cannonsetnosy: + brett.cannon
2015-02-04 06:08:26eric.snowsetmessages: + msg235374
2015-02-04 06:06:31eric.snowsetnosy: + eric.snow
2015-02-03 18:24:13eric.smithsetnosy: + eric.smith
2015-02-03 17:55:40alynncreate