vmanera at manord.com
Tue May 23 09:30:54 EDT 2006
Ok! I have PythonHandler mod_python.servlet, and only 5 modules with: >From mod_python.servlet import * so no hard work for fix. Instead a lot with: from mod_python.servlet import HTMLPage (HTMLPage inherit from Servlet) Sorry for my ignorance, but I have to fix with apache.import_module() also those that import HTMPLPage? Villiam -----Messaggio originale----- Da: Graham Dumpleton [mailto:grahamd at dscpl.com.au] Inviato: martedì 23 maggio 2006 13.09 A: Manera, Villiam Cc: mod_python at modpython... list Oggetto: Re: R: R: [mod_python] Servlet Loading problem 1 year later On 23/05/2006, at 8:15 PM, Manera, Villiam wrote: > I don't use apache.import_module() in any of my own modules. The > problem arise in developer (linux:RH3 EL mod_python 3.2.8) > And in the production (linux:RH3 EL mod_python 3.1.5) > > If I right understand the article only in mod_python 3.2.8 the new > module loding is in place. > > Villiam If you are specifying: PythonHandler mod_python.servlet or: PythonHandler servlet if you put the mpservlets code in your handler directory, then you are. This is because the PythonHandler directive uses "apache.import_module ()". All it then takes to cause problems is for you to use: import mod_python.servlet from mod_python import servlet or: import servlet depending on whether mpservlets installed centrally or in handler directory. If this is the case, you might solve the problem by using "apache.import_module()" to import "mod_python.servlet" etc. Graham > On 22/05/2006 at 22:56 Graham Dumpleton wrote: > >> Please keep followups on list. > >> You don't need to actually touch servlet.py to get problems if you > happen to be using "import" and "apache.import_module ()" on the same > module at different times. This is because of an issue in the > mod_python > importer. See: > >> > http://www.dscpl.com.au/articles/modpython-003.html#redundant- > module-loa > ding > >> Sorry for quick reply, in a rush. I'll try and comment later on the > whole issue of checking subclass types and caching. > >> Graham > > On 22/05/2006, at 11:06 PM, Manera, Villiam wrote: > >> Yes, i knows that it could be happened if I touch servlet.py becouse >> Daniel Popowiwich told me 1 year ago. >> >> ....