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 eric.snow
Recipients Greg Whiteley, barry, brett.cannon, eric.smith, eric.snow
Date 2020-05-01.15:40:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588347646.99.0.153092901688.issue40350@roundup.psfhosted.org>
In-reply-to
Content
Ah, namespace packages. :)  Yeah, the code is not taking the "spec.loader is None" case into account.  I expect the fix would be to add handling of that case a few lines up in the code, right after handling BuiltinImporter and FrozenImporter.  Offhand I'm not sure if the "type" should be _PKG_DIRECTORY or some new one just for namespace packages.  How does imp.find_module() (on which modulefinder._find_module() is based) respond to namespace packages?

[1] https://docs.python.org/3/library/importlib.html#importlib.machinery.ModuleSpec.loader
History
Date User Action Args
2020-05-01 15:40:47eric.snowsetrecipients: + eric.snow, barry, brett.cannon, eric.smith, Greg Whiteley
2020-05-01 15:40:46eric.snowsetmessageid: <1588347646.99.0.153092901688.issue40350@roundup.psfhosted.org>
2020-05-01 15:40:46eric.snowlinkissue40350 messages
2020-05-01 15:40:46eric.snowcreate