[mod_python] Module importer issues list updated.

Graham Dumpleton grahamd at dscpl.com.au
Fri Feb 3 16:54:23 EST 2006

On 03/02/2006, at 10:07 PM, Martin MOKREJŠ wrote:

> After reading "Auto Reload Mechanism" section and especially
> <quote>
> If the importing of the module by an explicit call to the 
> "import_module()"
> function is performed at global scope within a module, whether the 
> child
> module has changed and whether it needs to be reimported, is only
> determined at the time that the parent module is first imported and
> when the parent module is subsequently reimported.
> </quote>
> I am not certain what happens when using normal python import()
> function and I for example changed only some of those child modules.
> Will they be reloaded? It is probbly answered by the first paragraph in
> the section cited above, but am not certain.

The way things work at the moment is that if you import a module using
just the "import" statement, it will never be reloaded. This is even if
the parent module that it was imported in was reloaded. This is standard
for Python.

> I think it would be nice if you'd include what is usually the IO 
> penalty
> for all those stat() calls to determine whether a module has changed
> or not.

I am going to quote something from documentation I am writing on how the
replacement module loader will work:

   First and foremost any replacement system should strive for 
   and robustness. Inevitably this may mean some reduction in 
   Tuning of the system to improve the performance should be seen as a
   secondary task, only carried out after the functionality of the system
   is found to be correct and adequate to replace the existing system.

I have this big note in the documentation because part of the reason 
I gave up discussing a new system on the mailing list in the past is
because some wanted to focus more on their concerns about performance
over whether the system worked correctly.

Can we please not go down that avenue at the moment and focus on getting
something that works first. :-)


More information about the Mod_python mailing list