Opened 13 years ago

Closed 13 years ago

#1497 closed defect (invalid)

Django mod_python handler fails with older python 2.3

Reported by: nick.phillips@… Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Due to what appears to be a bug in in the version of python 2.3 shipped in Debian (Debian package version 2.3.5-2), Django's mod_python handler fails (in class ModPythonHandler's __call__ method):


Newer versions of have updated the way that os.environ.update handles non-dict arguments -- it seems in older versions we need to make sure we really do pass it a dict. So something like this:

        keys = req.subprocess_env.keys()
        tmp_env = {}
        for k in keys:
            tmp_env[k] = req.subprocess_env[k]

is required (this is what the newer does anyway).

Change History (2)

comment:1 Changed 13 years ago by nick.phillips@…

Actually, I guess this may depend on the version of mod_python too -- I have 2.7.10 (as debian's 2:2.7.10-4). Perhaps subprocess_env really is a dict in more recent versions?

I say this because it seems that all sorts of problems are arising that might be resolved by a newer mod_python (next one is req.ap_auth_type not present, causing AttributeError).

Damn. Now I see that it actually *is* documented that I need mod_python 3.x...

/me hangs head in shame



comment:2 Changed 13 years ago by Adrian Holovaty

Resolution: invalid
Status: newclosed

So this isn't an issue, then, on mod_python 3.x? I'm closing the ticket...

Note: See TracTickets for help on using tickets.
Back to Top