Author ncoghlan
Recipients Arfrever, brett.cannon, eric.smith, eric.snow, lemburg, ncoghlan, pitrou
Date 2012-04-25.12:32:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1335357137.03.0.367469540365.issue14657@psf.upfronthosting.co.za>
In-reply-to
Content
Still no patch from me, but I did create the rudiments of a shared script for poking around at the import internals (Tools/scripts/import_diagnostics.py)

Looking at Antoine's patch, I'd be happier with it if it *didn't* mutate the attributes of _frozen_importlib, but instead just added importlib._bootstrap as an alias for accessing it.

That would bring it in line with the way we handle os.path as being just an alias for the appropriate top level module:

>>> import os.path
>>> os.path.__name__
'posixpath'

Getting access to the source level _bootstrap implementation for testing purposes would then just require the usual techniques for bypassing C accelerators (specifically, using test.support.import_fresh_module with "_frozen_importlib" blocked).

That would address the immediate problem of module duplication, without misrepresenting what is going on in potentially confusing ways.
History
Date User Action Args
2012-04-25 12:32:17ncoghlansetrecipients: + ncoghlan, lemburg, brett.cannon, pitrou, eric.smith, Arfrever, eric.snow
2012-04-25 12:32:17ncoghlansetmessageid: <1335357137.03.0.367469540365.issue14657@psf.upfronthosting.co.za>
2012-04-25 12:32:16ncoghlanlinkissue14657 messages
2012-04-25 12:32:16ncoghlancreate