Nick Coghlan <ncogh...@gmail.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14657>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to