Re: [Zope-CMF] [dev] tools as utilities

2012-09-06 Thread Lennart Regebro
On Thu, Sep 6, 2012 at 7:59 AM, Tres Seaver tsea...@palladion.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/06/2012 01:37 AM, Lennart Regebro wrote: On Wed, Sep 5, 2012 at 5:01 PM, Tres Seaver tsea...@palladion.com wrote: And if we don't want to support more than one site

Re: [Zope-CMF] [dev] tools as utilities

2012-09-06 Thread yuppie
Hi Laurence! Laurence Rowe wrote: On 5 September 2012 19:21, Laurence Rowe l...@lrowe.co.uk wrote: Instead of removing the RequestContainer, it could be replaced with a zope.globalrequest aware RequestContainer. That might be cleaner than rewrapping in individual utilities, and would work

Re: [Zope-CMF] [dev] tools as utilities

2012-09-06 Thread Patrick Gerken
On Thu, Sep 6, 2012 at 7:59 AM, Tres Seaver tsea...@palladion.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/06/2012 01:37 AM, Lennart Regebro wrote: On Wed, Sep 5, 2012 at 5:01 PM, Tres Seaver tsea...@palladion.com wrote: And if we don't want to support more than one site

Re: [Zope-CMF] [dev] tools as utilities

2012-09-06 Thread Charlie Clark
Am 06.09.2012, 11:56 Uhr, schrieb Patrick Gerken patrick.ger...@computer.org: Wait, what? Whenever I look into structure, there is only basic information, not even the workflow states of the objects get exported. What am I doing wrong? I was thinking something similar: can you really use

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread yuppie
Hi! Charlie Clark wrote: Am 04.09.2012, 15:35 Uhr, schrieb Tres Seaver tsea...@palladion.com: I'd rather not add any cruft to support .zexp imports, which have seemed fundamentally broken to me for a long time. I'd agree on that. Occasionally, and on a strict, per object basis, they have

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread Laurence Rowe
On 5 September 2012 11:48, yuppie y.2...@wcm-solutions.de wrote: 2.) Site root lookup: = In several tools we still assume aq_parent(aq_inner(self)) is the portal. Or other code uses the tool as context object, expecting root and request in its acquisition chain. These

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread yuppie
Hi Laurence! Laurence Rowe wrote: On 5 September 2012 11:48, yuppie y.2012-E2EsyBC0hj3+aS/vkh9...@public.gmane.org wrote: 2.) Site root lookup: = In several tools we still assume aq_parent(aq_inner(self)) is the portal. Or other code uses the tool as context object,

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread Charlie Clark
Am 05.09.2012, 11:48 Uhr, schrieb yuppie y.2...@wcm-solutions.de: I use a single Zope instance for several small CMF sites and I use .zexp export and import for moving CMF sites from one Zope instance to an other. Works fine for me. Even with Plone sites. Even if it works for you I'm not

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread Laurence Rowe
On 5 September 2012 13:26, yuppie y.2...@wcm-solutions.de wrote: Hi Laurence! Laurence Rowe wrote: On 5 September 2012 11:48, yuppie y.2012-E2EsyBC0hj3+aS/vkh9...@public.gmane.org wrote: 2.) Site root lookup: = In several tools we still assume

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread Lennart Regebro
On Wed, Sep 5, 2012 at 1:40 PM, Charlie Clark charlie.cl...@clark-consulting.eu wrote: Am 05.09.2012, 11:48 Uhr, schrieb yuppie y.2...@wcm-solutions.de: I use a single Zope instance for several small CMF sites and I use .zexp export and import for moving CMF sites from one Zope instance to an

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread yuppie
Hi! Charlie Clark wrote: Am 05.09.2012, 11:48 Uhr, schrieb yuppie y.2...@wcm-solutions.de: getToolByName is no option because it is part of the machinery that should become obsolete. Not sure that is should actually ever become obsolete. Much as I am in favour of the interface-based

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread yuppie
Hi! Laurence Rowe wrote: On 5 September 2012 13:26, yuppie y.2012-E2EsyBC0hj3+aS/vkh9...@public.gmane.org wrote: I don't think relying on getSite() is a good idea. As you mention it doesn't always return the portal object. And the fact it is stored with the request in its context is just an

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread Charlie Clark
Am 05.09.2012, 15:36 Uhr, schrieb yuppie y.2...@wcm-solutions.de: - CMF 2.3 targets Zope 2.13 as primary platform. So we can't rely on Zope 4 features. Agreed, but we should be looking to getting 2.3 out of the door anyway. Charlie -- Charlie Clark Managing Director Clark Consulting

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread Charlie Clark
Am 05.09.2012, 15:05 Uhr, schrieb Lennart Regebro rege...@gmail.com: I think it is. We have to have some way to move a Plone site from one ZODB to another. No, one site per Data.fs is what we should support. This has more or less been the explicit aim of Zope 2.8 I find export by zexp

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread Laurence Rowe
On 5 September 2012 15:36, yuppie y.2...@wcm-solutions.de wrote: Hi! Laurence Rowe wrote: On 5 September 2012 13:26, yuppie y.2012-E2EsyBC0hj3+aS/vkh9...@public.gmane.org wrote: I don't think relying on getSite() is a good idea. As you mention it doesn't always return the portal object.

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread Lennart Regebro
On Wed, Sep 5, 2012 at 3:42 PM, Charlie Clark charlie.cl...@clark-consulting.eu wrote: No, one site per Data.fs is what we should support. This has more or less been the explicit aim of Zope 2.8 So you want to tell everyone that either has not received that message, or used Plone since before

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread Charlie Clark
Am 05.09.2012, 16:00 Uhr, schrieb Lennart Regebro rege...@gmail.com: So you want to tell everyone that either has not received that message, or used Plone since before 2.5, That yeah, I know you can do that, but we were just messing with you so now you are fucked. I think you are taking my

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread yuppie
Hi! Laurence Rowe wrote: Precisely because CMF 2.3 targets Zope 2.13 - persistent local utilities returned by getUtility lack any sort of acquisition context in Zope2, so the result of getUtility(ISiteRoot) will return aq_base(portal), which is unlikely to be useful. getSite() instead returns

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/05/2012 10:00 AM, Lennart Regebro wrote: On Wed, Sep 5, 2012 at 3:42 PM, Charlie Clark charlie.cl...@clark-consulting.eu wrote: No, one site per Data.fs is what we should support. This has more or less been the explicit aim of Zope 2.8

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread yuppie
Laurence Rowe wrote: Maybe I'm missing something, but the various methods of IURLTool rely on portal.getPhysicalPath() returning the correct result. Take getRelativeContentPath for example: portal is at /folder/portal content is at /folder/portal/content

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread Laurence Rowe
On 5 September 2012 17:15, yuppie y.2...@wcm-solutions.de wrote: Laurence Rowe wrote: Maybe I'm missing something, but the various methods of IURLTool rely on portal.getPhysicalPath() returning the correct result. Take getRelativeContentPath for example: portal is at /folder/portal content

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread Lennart Regebro
On Wed, Sep 5, 2012 at 5:01 PM, Tres Seaver tsea...@palladion.com wrote: And if we don't want to support more than one site the ZODB, there should be a warning of you try to do it, btw. I've got no problem with more than one CMF site in a single Zope instance; I just don't want to promote

Re: [Zope-CMF] [dev] tools as utilities

2012-09-05 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/06/2012 01:37 AM, Lennart Regebro wrote: On Wed, Sep 5, 2012 at 5:01 PM, Tres Seaver tsea...@palladion.com wrote: And if we don't want to support more than one site the ZODB, there should be a warning of you try to do it, btw. I've got no

[Zope-CMF] [dev] tools as utilities

2012-09-04 Thread yuppie
Hi! In CMF 2.3 (beta) all core tools can be looked up using getUtility for mandatory tools or queryUtility for optional tools. That's a big step forward, but there are still some places where we depend on tool characteristics: 1.) Bootstrapping: == Importing .zexp files

Re: [Zope-CMF] [dev] tools as utilities

2012-09-04 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/04/2012 02:59 AM, yuppie wrote: Hi! In CMF 2.3 (beta) all core tools can be looked up using getUtility for mandatory tools or queryUtility for optional tools. That's a big step forward, but there are still some places where we depend

[Zope-CMF] [dev] tools as utilities

2011-09-12 Thread yuppie
Hi! 5 years ago we started converting CMF tools into local utilities, and we are still stuck in the middle of that task. The problem is that local utilities don't have REQUEST in their acquisition chain. A few tool methods use self.REQUEST and the plan was to replace these methods by view

Re: [Zope-CMF] [dev] tools as utilities

2011-09-12 Thread Jens Vagelpohl
On Sep 12, 2011, at 11:52 , yuppie wrote: Hi! 5 years ago we started converting CMF tools into local utilities, and we are still stuck in the middle of that task. The problem is that local utilities don't have REQUEST in their acquisition chain. A few tool methods use self.REQUEST

Re: [Zope-CMF] [dev] tools as utilities

2011-09-12 Thread yuppie
Hi! Jens Vagelpohl wrote: On Sep 12, 2011, at 11:52 , yuppie wrote: I propose to use 'five.globalrequest' instead of self.REQUEST inside tools. AFAICS that allows to convert *all* tools into utilities. Why would you want to add a dependency for 3 lines of code? All that package does is

Re: [Zope-CMF] [dev] tools as utilities

2011-09-12 Thread Hanno Schlichting
On Mon, Sep 12, 2011 at 12:32 PM, yuppie y.2...@wcm-solutions.de wrote: Jens Vagelpohl wrote: On Sep 12, 2011, at 11:52 , yuppie wrote: I propose to use 'five.globalrequest' instead of self.REQUEST inside tools. AFAICS that allows to convert *all* tools into utilities. +1 Why would you want