[mod_python] null pointer to PyObject_CallMethod

Graham Dumpleton graham.dumpleton at gmail.com
Sun Mar 25 17:47:31 EST 2007


On 26/03/07, Christian Boos <cboos at neuf.fr> wrote:
> Graham Dumpleton wrote:
> > On 25/03/07, Christian Boos <cboos at neuf.fr> wrote:
> >> Graham Dumpleton wrote:
> >> > ..... Confirm in your application that main interpreter is being used
> >> > by dumping out
> >> > 'apache.interpreter' or 'req.interpreter'.
> >>
> >> Interesting, I can see some use for that in Trac, as running in
> >> sub-interpreters also proves to be problematic for us.
> >
> > This comment suggested you might be involved with the development of
> > Trac. Is that the case or are you just a dedicated user?
>
> I'm indeed a Trac developer

Good to see you on the list then and taking an interest what happens
over here in mod_python land. We rarely if at all see any developers
involved with any of the major Python web frameworks or applications
here. This is particularly frustrating sometimes especially when they
make comments in their documentation about mod_python that are wrong
or just don't make sense. They never actually come here and find out
what the truth may be and leaving comments against their documentation
never seems to result in a change or further explanation being given.
As a result you get some packages blaming mod_python for problems
where it looks more like some short coming in the other package. Don't
get me wrong here, this comment is not directed at Trac, I have a
totally different Python web framework in mind when I say this. ;-)

> and in the comment above I was referring to
> add those informations to the "system information" we display in the
> About page or sent in the semi-automated error reports, in Trac 0.11
> (when logged as TRAC_ADMINs).

FWIW, in mod_wsgi which Trac is starting to list references on their
site to, to get the name of the interpreter one currently grabs
'mod_wsgi.application_group' out of the WSGI environment dictionary.
If it is an empty string then it is the main Python interpreter, ie.,
same actual interpreter as 'main_interpreter' in mod_python. This is
the only interpreter that is shared between mod_python and mod_wsgi.

I may need to see about actually having a 'mod_wsgi.interpreter_name'
which is distinct from this though. For now it will be the same value,
but later on when look at distinct back end daemon process, setting
the application group may mean sending it to a daemon process but in
that daemon process that application group may be set to run in the
main interpreter and thus the interpreter name would be different to
the application group name. Anyway, enough rambling.

Graham


More information about the Mod_python mailing list