quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory (Grisha) Trubetskoy" <gri...@apache.org>
Subject Re: Alpha release?
Date Thu, 21 Aug 2003 20:56:13 GMT

Thanks, Barry, I think this is good - it didn't occur to me to do it this
way. I checked the patch in and also removed the paragraph you mention
from the docs.


On Thu, 21 Aug 2003, Barry Pederson wrote:

> Gregory (Grisha) Trubetskoy wrote:
> > Given that there isn't a lot of feedback on this list, and given that I
> > can't think of any changes/additions to the code as it is right now, I
> > propose that we release it as 3.1.0 alpha with an announcement to a wider
> > audience (the other list, and may be comp.lang.python), so that it can get
> > more exposure and better testing.
> I've got another suggestion ...
> Right now, mod_python mixes in some data with the user's data that get
> pickled, and the docs mention:
> ---------
> (A few key names are used by the BaseSession
> class itself for storing session metadata, they are preceeded with
> an underscore, so if you stay away from key names beginning with an
> underscore, you should be safe.)
> ---------
> That seems unnecessary.  I'd suggest storing the metadata in a
> dictionary, and having the user's dictionary stored as a member of the
> metadata dictionary, say under the key name "_data".  That way there's
> no worries about keyname conflicts, makes the thing a bit more
> bulletproof.
> I'll attach a patch showing what I have in mind - the only cost should
> be a few more bytes in the pickle.  The subclass implementations of
> do_load() and do_save() are simplified a bit, and the session cleanup
> code doesn't need to be changed at all.
> I also tried moving checking for expired sessions down into the
> BaseSession.load() method, instead of completely loading the session and
> then later on deciding in __init__() that you have to undo what you did
> in load().
>      Barry

View raw message