[Numpy-discussion] Further info on mod_python / numpy crashing

Dav Clark dav at alum.mit.edu
Fri Mar 10 12:22:03 CST 2006

First - I realized I failed to include version numbers.  I'm using numpy 
0.9.5, and mod_python 3.1.4 and apache 2.0.54.  Standard (I think) for 
red hat FC4 on an intel box.

So, I've spent some time tracing through mod_python... the bad code is 
here, from the import_module def in mod_python/apache.py:

        parts = module_name.split('.')
         for i in range(len(parts)):
             f, p, d = imp.find_module(parts[i], path)
                 mname = ".".join(parts[:i+1])
                 module = imp.load_module(mname, f, p, d)
                 if f: f.close()
             if hasattr(module, "__path__"):
                 path = module.__path__

 From a mod_python interpreter - all calls to import get replaced with 
import_module (to prevent reloads).  The setting of the 'path' parameter 
in this way is (I think) invoking the same bug that causes the crash 
when imoporting numpy from ../site-packages/numpy.

Can anyone even replicate this?

Should I cross-post this to mod_python?


More information about the Numpy-discussion mailing list