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 ncoghlan
Recipients brett.cannon, georg.brandl, ncoghlan
Date 2012-07-18.13:43:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Checking with and importlib.util (which turned out not to have the problem) put me on the right path: the problem is the import of "imp" in importlib.__init__

What appears to be happening is that the interpreter sees the partially initialised importlib package, considers it good enough, and continues on with importing _bootstrap and machinery from source. Control eventually returns to __init__ and it overwrites the source version with the frozen version.

Changing the __init__ file to do "import _imp" instead (the same as what import_init does in the C code) was enough to fix it.

No patch yet - the actual fix is trivial, but it needs a test.
Date User Action Args
2012-07-18 13:43:52ncoghlansetrecipients: + ncoghlan, brett.cannon, georg.brandl
2012-07-18 13:43:52ncoghlansetmessageid: <>
2012-07-18 13:43:51ncoghlanlinkissue15386 messages
2012-07-18 13:43:51ncoghlancreate