[mod_python] Severe problems with importing still happening.

Sean Reifschneider jafo at tummy.com
Thu Aug 26 12:05:53 EDT 2004

I just wanted to follow up to some previous messages and say that the
problem still seems to be there.  In particular, I'm talking about the
problems that I've mentioned in May of this year and June of last year:


A few weeks ago I was finally able to get the new toolchain working
(with python 2.3.4 and mod_python 3.1.3), and the problem still is
happening there.

Some of these problems can be worked around by changing the way things
are imported, importing them earlier instead of later.  However, it
seems that the more complicated the code is that you're dealing with,
the more likely you are to run into this problem.

I've just been contacted by another user who is also, apparently,
running into this problem on mod_python 3.1.3 and Python 2.3.4.  As far
as I know, they are not using dynamic imports the way I was.

I have completely re-designed JOTWeb so that all the user code now gets
imported right up front, instead of importing code as my users reference
it.  This seems to have worked around that problem.  Unfortunately, it's
crippled the code structuring that I had before, basically requiring
that everything reside in one module that's imported right up front.

Unfortunately, the only way I know of to reproduce this problem requires
Zope 3's Page Templates and JOTWeb to be installed and configured.

Obviously, it would be nice if this bug could get fixed.  I'd be happy
to work with someone who has a good understanding of the import hooks in
mod_python.  I, unfortunately, don't have the time right now to become
an expert in the mod_python code to the point where I'm likely to be
able to track this down on my own.

 If java had real garbage-collection, it would delete most programs
 before it executed them.  -- Sean Reifschneider, 2002
Sean Reifschneider, Member of Technical Staff <jafo at tummy.com>
tummy.com, ltd. - Linux Consulting since 1995.  Qmail, Python, SysAdmin

More information about the Mod_python mailing list