durusmail: quixote-users: Session expiry changes in Quxiote 1.0?...
Session expiry changes in Quxiote 1.0?...
2004-10-01
Session expiry changes in Quxiote 1.0?...
Bill Noon
2004-10-01
Stuart -- I just ran into this myself.  The internal structure of
Session objects changed in going to v1.0 which would make the old
session object invalid.

The attributes (__remote_address, __creation_time, __access_time) were
renamed to (_remote_address, _creation_time, _access_time).  Though
these are internal attributes, pickled (and shelved) objects cannot be
moved between versions.

I am using a local bsddb/pickle based session manager that that
returned sessions without the correct attributes which raised
exceptions later.  Shelve must be deleting the invalid sessions.

Clearing the session db fixed the problem (but lost the data).  I could
have written a serializer that converted from the old session object
version to the new version, but didn't because the session info we
store is basically transient anyway.

--Bill Noon
Northeast Regional Climate Center
Cornell University

On Oct 1, 2004, at 1:30 AM, Stuart Hungerford wrote:

> Hi,
>
> I've recently upgraded the installed version of Quixote
> for a Quixote-backed site from 0.7 to 1.0.
>
> There have been no changes to the python code of the site,
> but I now see the error page "Your session is invalid or has
> expired. Please reload this page to start a new session."
> very frequently.
>
> Has something in Quixote's session handling and expiring
> changed in V1.0?
>
> My main CGI script does this for persistent sessions:
>
> class session(Session):
>     is_dirty = Session.has_info
>
> sessions = shelve.open("/tmp/sessions")
> session_mgr = SessionManager(session_class = session,
>                              session_mapping = sessions)
>
> Any advice much appreciated!
>
>
> Cheers,
>
> Stu
>
> --
>
> Stuart Hungerford
> ANU Internet Futures Project
>
> _______________________________________________
> Quixote-users mailing list
> Quixote-users@mems-exchange.org
> http://mail.mems-exchange.org/mailman/listinfo/quixote-users


reply