[Zope-dev] Sanity Check on zope.sessions and Zope 2.12.x

Jeff Rush jrush at taupro.com
Wed Apr 11 11:13:35 UTC 2012


I'm chasing a problem when trying to use zope.sessions with Zope 2.12.x, 
and I'm beginning to think that they are an incompatible mix of Zope2 
and Zope3 technologies.

Can anyone confirm either way, so I know whether I'm wasting my time.

What is happening is when I adapt the request I receive to IClientId, 
the CookieClientIdManager within zope.sessions code (logically) wants to 
invoke request.response.getCookie().  However the response object my 
view is receiving is a ZServerHTTPResponse, which lacks such a method. 
Considering that Zope 2.12.x runs ZServer, it makes sense I'm seeing 
ZServerHTTPRequest/ZServerHTTPResponse objects, but that means the 
ClientIdManager inside zope.session is just not compatible with ZServer.

Am I missing something?  Is there some magic someplace that fixes up the 
incompatibility in some way I'm missing?

I'm guessing my only solution is to re-implement a ClientIdManager 
utility that restricts itself to the API provided by 
ZServerHTTPRequest/ZServerHTTPResponse.

-Jeff


More information about the Zope-Dev mailing list