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 <1342619032.52.0.350891726771.issue15386@psf.upfronthosting.co.za>
In-reply-to
Content
Checking with importlib.abc 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.
History
Date User Action Args
2012-07-18 13:43:52ncoghlansetrecipients: + ncoghlan, brett.cannon, georg.brandl
2012-07-18 13:43:52ncoghlansetmessageid: <1342619032.52.0.350891726771.issue15386@psf.upfronthosting.co.za>
2012-07-18 13:43:51ncoghlanlinkissue15386 messages
2012-07-18 13:43:51ncoghlancreate