Message159273
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. |
|
Date |
User |
Action |
Args |
2012-04-25 12:32:17 | ncoghlan | set | recipients:
+ ncoghlan, lemburg, brett.cannon, pitrou, eric.smith, Arfrever, eric.snow |
2012-04-25 12:32:17 | ncoghlan | set | messageid: <1335357137.03.0.367469540365.issue14657@psf.upfronthosting.co.za> |
2012-04-25 12:32:16 | ncoghlan | link | issue14657 messages |
2012-04-25 12:32:16 | ncoghlan | create | |
|