[mod_python] How to stop reimporting modules

Graham Dumpleton grahamd at dscpl.com.au
Sat Apr 9 20:59:16 EDT 2005


On 10/04/2005, at 7:59 AM, dharana wrote:

> One small question. If the issue of submodules being cached by 
> mod_python is so frequent, shouldn't be an indicator that perhaps 
> something should be changed?
>
> I know there are archives. I know it may probable has been answered 
> many times before but everytime I'm coding with mod_python I have a 
> terminal with buffers full of "apachectl restart" and as Python is an 
> interpreted language, not a compiled one I always find it weird to 
> need to do that.
>
> Isn't it trivial or correct to import the vampire caching mechanism 
> into mod_python and _only_ use it with an specific apache Python* 
> directive?

It isn't trivial to fix the problems in the mod_python module loading 
mechanism
because to address some of the issues would most likely necessitate 
breaking backward
compatibility. Some people have also expressed the view that they 
believe the current
system is fine and that although it has limitations that that is life 
and one should
accept it and code based on certain conventions which avoid any 
specific problems.

Overall, one could fix a couple of problems that it would be hard to 
argue are not
bugs, but other changes aren't likely to happen, as it means a change 
in the basic
concept of how one sees how module imports should be handled. Thus one 
would probably
find it quite hard to reach any consensus, especially if it means that 
one can't
guarantee that all existing code will work the same way without changes.

Graham



More information about the Mod_python mailing list