[mod_python] Session Pickling Error II - 3.2.2b

Terence MacDonald terry.macdonald at dsl.pipex.com
Tue Oct 4 18:08:12 EDT 2005

On Wed, 2005-10-05 at 07:28 +1000, Graham Dumpleton wrote:
> The only way I can see there possibly being a problem is if the
> apache.import_module() method were being used to import
> pyPgSQL module and it was getting reloaded. I would expect
> though that pyPgSQL is a standard module in site-packages
> though so would be imported using "import". Yes/No?
the PyPgSQL module PgSQL.py is imported using the usual "import", this
import resides in my database module which itself is imported, by my
processing modules, using apache.import_module(). I have PythonOption
AutoReload set to 'on'

I have stopped using apache.import_module inline to import my database
module when required and resorted to 'top of the file' import instead.
The problem appears (fingers crossed!) to have gone away.

I am still not sure what the problem or the solution is/was, except that
it is related to import_module, pickling session data that has object
instances and a pickling helper function (in this case a function named
_B that aids in pickling PgBoolean instances and is declared in the
init.py file of the PyPgSQL package) not being at the same address....
If that makes sense

More information about the Mod_python mailing list