ISession doesn't know or care about "ids", as Pyramid officially only has 
"Client-Side Sessions", which are id-less.

If you're using a server-side ID, the id is the full value of the cookie. 
The ways to find that out are:

- inspect the cookies
- inspect the session dict, hope that it has the "session id" in it -- 
however this can be stored differently depending on the sessioning 
provider, so you can have a mess of code if you have different providers on 
production/staging/deployment.

You absolutely don't need the session_id to handle this.  It's largely a 
convenience method.  

But, and large 'but' here -- this is really needed during 
unit/integrated-testing and troubleshooting of server-side sessions.  In my 
experience, it is really messy/ugly code to get around this limitation.  

I don't think there would be a use case for having a ServerSide session 
(which has an id) and needing to query that id outside of an automatic 
iSession implementation. I think anything storing data based on that ID 
would be handled within the __init__ ; and anything stored in other 
'tables' would be keyed to an identifier within a client or server session.

For me, this has really always been about testing.  Server Side sessions 
are essentially a "black box". I'd love to be able to access the 
corresponding cookie values to see the id or encrypted/signed payload 
easily.  it's a complete pain in the ass to do so otherwise.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to