Nathaniel Smith <n...@pobox.com> added the comment:

Steve said:
> The import hook was my proposal to let you only preload DLLs when the 
> extension module is being loaded, rather than having to load all the DLLs on 
> the first "import scipy" just in case one of its submodules gets imported 
> later. A hook can trigger on a specific module.

That's a good point: we could write an import hook that examines each .pyd 
before it's loaded, and then preloads just the .dlls that it's looking for. 
But... that's literally reimplementing what the normal DLL loader does. If we 
can get the normal DLL loader to work, it's probably going to be simpler. And 
so long as we're talking specifically about the case where it's a directory we 
control and that only contains .dlls with mangled names, then it seems fine to 
me. (And maybe Ray will have to hold his nose, but, well, you know. That's 
programming sometimes.)

xoviat said:
> This is what ray said:
> "Please do not do this. Importing a specific module should not modify the way 
> that process loads subsequent DLLs."

I'm not sure what Ray's worried about exactly, but I don't see anything in his 
comment that makes me think moving the DLL path manipulation code into the 
interpreter will make him happier.

I think this can be closed.

----------

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

Reply via email to