[Python-Dev] Making the __import__ hook available early...

Tim Peters tim.one@home.com
Fri, 9 Feb 2001 17:07:43 -0500


[M.-A. Lemburg]
> There has been some discussion on the import-sig about using
> the __import__ hook for practically all imports, even early
> in the startup phase. This allows import hooks to completely take
> over the import mechanism even for the Python standard lib.
>
> Thomas Heller has provided a patch which I am currently checking.
> Basically all C level imports using PyImport_ImportModule()
> are then redirected to PyImport_Import() which uses the __import__
> hook if available.
>
> My testing has so far not produced any strange effects. If anyone
> objects to this change, please speak up. Else, I'll check it in
> later today.

I don't understand the change, from the above.  Neither exactly what it does
nor why it's being done.  So, impossible to say.  Was the patch posted to
SourceForge?  Does it have a bad effect on startup time?  Is there any
*conceivable* way in which it could change semantics?  Or, if not, what's
the point?