[issue14657] Avoid two importlib copies
Nick Coghlan
report at bugs.python.org
Wed Apr 25 17:58:29 CEST 2012
Nick Coghlan <ncoghlan at gmail.com> added the comment:
The other advantage of splitting the entry points is that we can tweak Brett's plan to make the import machinery explicit such that it happens in a separate function that's only called from __init__.py.
That way the published hooks will always be from the on-disk implementation and never from the frozen one.
If you're after the ability to emit debugging messages in a way that doesn't cause fatal errors during system startup, the only way I can see is to have a "do nothing" module level display function in _bootstrap.py that is later replaced with a reference to builtins.print:
def _debug(*args, **kwds):
pass
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14657>
_______________________________________
More information about the Python-bugs-list
mailing list