quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barry Pederson ...@barryp.org>
Subject Re: Alpha release?
Date Thu, 21 Aug 2003 15:36:00 GMT
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 

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().


View raw message