[issue15576] importlib: ExtensionFileLoader not used to load packages from __init__.so files

Brett Cannon report at bugs.python.org
Sat Aug 11 16:00:27 CEST 2012


Brett Cannon added the comment:

So that test case is hard for me to follow since I don't know what a .srctree file is and the file seems to have some magical comments in it.

If my assumptions are correct you are generating a C file that does a relative import in the extension module's init function? Has that actually worked in the past? The error you are seeing suggests that the module is not being inserted into sys.modules before executing the body which I have no control over since that's the purview of imp.load_dynamic(). If you skip the relative imports does the import work otherwise?

----------
resolution: fixed -> 
stage: committed/rejected -> test needed
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15576>
_______________________________________


More information about the Python-bugs-list mailing list