Re: [Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-06-02 Thread Marius Gedminas
On Fri, May 30, 2008 at 01:55:44PM -0400, Benji York wrote: On Fri, May 30, 2008 at 1:40 PM, Brian Sutherland [EMAIL PROTECTED] wrote: I've just decided to jettison IAbsoluteURL and make a new interface ICanonicalURL. The adapters for ICanonicalURL are available anywhere without specially

Re: [Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-30 Thread Michael Bayer
On May 28, 2008, at 7:09 PM, Laurence Rowe wrote: Engine configuration is a subset of session configuration. You cannot have a single ScopedSession for a package if you want to have multiple instances of that application. We must work with unbound metadata if we have this goal. That

Re: [Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-30 Thread Brian Sutherland
On Thu, May 29, 2008 at 07:10:16PM +0200, Martijn Faassen wrote: [snip] I'm not sure whether it would be a good idea to wrap this in a session property, or just register it as an adapter. The only other object that would need access to the session (either as a property or through

[Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-30 Thread Martijn Faassen
Hey, Michael Bayer wrote: [snip discussion on BoundMetadata I don't comprehend yet but probably should :)] As far as ScopedSession, it's really just a thread local variable. Like any global threadlocal, you can stick whatever you want on it at the start of a request, and tear it down at

[Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-30 Thread Martijn Faassen
Brian Sutherland wrote: [snip] I'll note that there is a difference between where things are published (IAbsoluteURL) and where you should go to find their canonical representation. One problem I've found with using IAbsoluteURL and location proxies is getting the object directly from the

Re: [Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-30 Thread Brian Sutherland
On Fri, May 30, 2008 at 03:49:46PM +0200, Martijn Faassen wrote: Brian Sutherland wrote: [snip] I'll note that there is a difference between where things are published (IAbsoluteURL) and where you should go to find their canonical representation. One problem I've found with using

Re: [Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-30 Thread Benji York
On Fri, May 30, 2008 at 1:40 PM, Brian Sutherland [EMAIL PROTECTED] wrote: I've just decided to jettison IAbsoluteURL and make a new interface ICanonicalURL. The adapters for ICanonicalURL are available anywhere without specially wrapping the object in a location proxy. IAbsoluteURL doesn't

Re: [Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-30 Thread Benji York
On Fri, May 30, 2008 at 2:35 PM, Martijn Faassen [EMAIL PROTECTED] wrote: I guess one difference here is that it seems more common in the RDB scenario to have multiple ways to reach the same object, and even if you just publish one, you can get to the actual object in multiple ways. In this

[Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-30 Thread Martijn Faassen
Benji York wrote: On Fri, May 30, 2008 at 2:35 PM, Martijn Faassen [EMAIL PROTECTED] wrote: I guess one difference here is that it seems more common in the RDB scenario to have multiple ways to reach the same object, and even if you just publish one, you can get to the actual object in multiple

Re: [Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-30 Thread Michael Bayer
On May 30, 2008, at 9:44 AM, Martijn Faassen wrote: Hey, Michael Bayer wrote: [snip discussion on BoundMetadata I don't comprehend yet but probably should :)] As far as ScopedSession, it's really just a thread local variable. Like any global threadlocal, you can stick whatever you

Re: [Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-30 Thread Benji York
On Fri, May 30, 2008 at 3:03 PM, Martijn Faassen [EMAIL PROTECTED] wrote: Benji York wrote: I have an app that allows the same object to be reachable via several URLs. When we wanted one of the URLs to be preferred (none are really cononical in my case), then we did just as you suggest above

[Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-29 Thread Martijn Faassen
Laurence Rowe wrote: Martijn Faassen wrote: [snip] Before we talk more about session configuration, please explain why we're not talking about engine configuration. :) Engine configuration is a subset of session configuration. You cannot have a single ScopedSession for a package if you

[Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-29 Thread Laurence Rowe
Martijn Faassen wrote: Laurence Rowe wrote: Martijn Faassen wrote: [snip] Before we talk more about session configuration, please explain why we're not talking about engine configuration. :) Engine configuration is a subset of session configuration. You cannot have a single ScopedSession

[Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-28 Thread Laurence Rowe
Martijn Faassen wrote: Laurence Rowe wrote: We need to differentiate between the interface for session configuration and session usage from an application. Session configuration? I'm talking about engine configuration. A session doesn't need to be configured, except with a session, I think,

Re: [Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-25 Thread Brian Sutherland
On Sat, May 24, 2008 at 09:30:18PM +0100, Laurence Rowe wrote: Brian Sutherland wrote: On Fri, May 23, 2008 at 11:39:39PM +0100, Laurence Rowe wrote: We need to differentiate between the interface for session configuration and session usage from an application. For session usage I think it

[Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-25 Thread Laurence Rowe
Brian Sutherland wrote: On Sat, May 24, 2008 at 09:30:18PM +0100, Laurence Rowe wrote: Brian Sutherland wrote: On Fri, May 23, 2008 at 11:39:39PM +0100, Laurence Rowe wrote: We need to differentiate between the interface for session configuration and session usage from an application. For

Re: [Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-24 Thread Brian Sutherland
On Fri, May 23, 2008 at 11:39:39PM +0100, Laurence Rowe wrote: We need to differentiate between the interface for session configuration and session usage from an application. For session usage I think it is fairly simple. We should define an ISessionContext interface such that: class

[Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-24 Thread Laurence Rowe
Brian Sutherland wrote: On Fri, May 23, 2008 at 11:39:39PM +0100, Laurence Rowe wrote: We need to differentiate between the interface for session configuration and session usage from an application. For session usage I think it is fairly simple. We should define an ISessionContext interface

[Zope-dev] Re: zope.sqlalchemy, integration ideas

2008-05-23 Thread Laurence Rowe
We need to differentiate between the interface for session configuration and session usage from an application. For session usage I think it is fairly simple. We should define an ISessionContext interface such that: class ISessionContext(Interface): def __call__(): return a