Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev

Sanity Check on zope.sessions and Zope 2.12.x

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


jrush at taupro

Apr 11, 2012, 4:13 AM

Post #1 of 2 (226 views)
Permalink
Sanity Check on zope.sessions and Zope 2.12.x

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
_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
https://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope )


hanno at hannosch

Apr 11, 2012, 5:28 AM

Post #2 of 2 (201 views)
Permalink
Re: Sanity Check on zope.sessions and Zope 2.12.x [In reply to]

On Wed, Apr 11, 2012 at 1:13 PM, Jeff Rush <jrush [at] taupro> wrote:
> 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.

Sounds likely. I haven't heard of anyone trying to use zope.session in
Zope 2. Does zope.session do something very different from the Zope 2
session manager?

You might also want to look at
http://pypi.python.org/pypi/collective.beaker for seamlessly
integrating Beaker into Zope 2 - with all the advantages of Beaker and
different backends.

Hanno
_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
https://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope )

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.