Issue Details (XML | Word | Printable)

Key: MODPYTHON-81
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Unassigned
Reporter: Nicolas Lehuen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
mod_python

Pickling/unpickling top-level functions defined in published module no longer works in mod_python 3.2

Created: 04/Oct/05 03:46 PM   Updated: 29/Mar/06 07:21 PM
Component/s: importer
Affects Version/s: 3.2.7
Fix Version/s: None

Time Tracking:
Not Specified

Resolution Date: 29/Mar/06 07:20 PM


 Description  « Hide
See http://modpython.org/pipermail/mod_python/2005-October/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.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Graham Dumpleton added a comment - 07/Oct/05 10:06 PM
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.