Apache Mod-Python - Commented: (MODPYTHON-81) Pickling/unpickling top-level functions defined in publishe

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > October 2005 > Commented: (MODPYTHON-81) Pickling/unpickling top-level functions defined in publishe





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Commented: (MODPYTHON-81) Pickling/unpickling top-level functions defined in publishe
Graham Dumpleton (JIRA)

2005-10-07, 5:51 pm

[ http://issues.apache.org/jira/brows...action_12331587 ]

Graham Dumpleton commented on MODPYTHON-81:
-------------------------------------------

You also can't store class objects or even instances of classes. The case of class objects is similar to function objects. Although class instances will be able to pickled, they can't later be unpickled.

For a thorough analysis of the problems (believed to be correct) see:

http://www.dscpl.com.au/articles/modpython-005.html

I cannot see how it can be fixed and may be a limitation that has to be lived with. Users will simply need to ensure that any module with function objects or class objects in them isn't imported using the mod_python importing mechanism, but that standard
"import" is used.

> Pickling/unpickling top-level functions defined in published module no longer works in mod_python 3.2
> ------------------------------------------------------------------------------------------------------
>
> Key: MODPYTHON-81
> URL: http://issues.apache.org/jira/browse/MODPYTHON-81
> Project: mod_python
> Type: Bug
> Versions: 3.2.0
> Reporter: Nicolas Lehuen
> Fix For: 3.3.0


>
> See http://modpython.org/pipermail/mod_...ber/019158.html
> The problem is that pickling/unpickling top-level function is done by name, which requires that the module they are defined in can be imported in the usual way, or at least that it is registered in sys.modules.
> Fixing this in 3.2 alone seems quite difficult. I'd rather try to do this in 3.3, along with the major overhaul of the import system.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com