From: SourceForge.net <no...@so...> - 2003-01-16 16:32:36
|
Bugs item #492019, was opened at 2001-12-12 06:26 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104866&aid=492019&group_id=4866 Category: None Group: None Status: Closed Resolution: Fixed Priority: 3 Submitted By: Geoff Talvola (gtalvola) Assigned to: Nobody/Anonymous (nobody) Summary: should guard against pickle errors Initial Comment: SessionStore should protect against pickling errors. When it's saving a session to disk, it should first pickle to a string, then write the pickle out to a file. This two-step process ensures that if a pickling exception occurs, the file is not corrupted. And when it's reading in a session from disk, it should probably trap unpickling errors and transform them into KeyErrors. (Thanks to Ken Lalonde for pointing this out.) ---------------------------------------------------------------------- >Comment By: Stuart Donaldson (stuartd) Date: 2003-01-16 08:35 Message: Logged In: YES user_id=326269 It seems like unpicklable data is a developer only issue and should be caught in development. Try saving a session to disk (ie: shutting down the AppServer) and the sessions will get saved to disk. If data can't be saved because it is unpicklable then you'll get the error. I'm not sure how a run-time validation would be much more useful. I suppose you could do a very friendly validation that would walk the object and check each property, but again I am not sure if it is worth it in this case. Maybe I'm just fully understanding what the benefits might be. ---------------------------------------------------------------------- Comment By: Marcos Sánchez Provencio (rapto) Date: 2003-01-16 06:53 Message: Logged In: YES user_id=23678 Should there be some way to validate the current session, so it does not contain any unpickable object? In this 'safe' mode, a warning would be issued whenever something unpickable (a db session, for example) is assigned to the session. It would be a kind of bounds-checking option that could be turned off for speed. ---------------------------------------------------------------------- Comment By: Stuart Donaldson (stuartd) Date: 2003-01-15 11:43 Message: Logged In: YES user_id=326269 This was resolved along with handling patch [ 630505 ] Store session pickle error handling This will be present in the 0.8 release. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104866&aid=492019&group_id=4866 |