Re: [Zope-dev] Move implementation of getParent to zope.location?

2009-09-09 Thread Christian Theune
Hi there,

On 08/12/2009 12:06 PM, Jim Fulton wrote:
>
> Right. I understood this in the original proposal. Given that it
> doesn't break the existing API, I have no major problem with it, which
> is why I didn't bother to respond in the first place.  I have a small
> problem that it fattens an existing API.

As far as I understand, the method is there and used and should have
been in that existing API in the first place.

Also, as you say it's only a small problem for you, I guess Thomas can
go ahead moving it.

> I have a larger problem that
> we are wasting time on this. The cleanup doesn't seem worth it to me.
> I especially don't like that *I'm* spending time on this rather than,
> say, working on the kgs or our buildout discussions.

I see truth in what you say, but this answer also takes energy from
people who'd like to spend time on improving small things (which quickly
sum up to larger things) pushing them away from contributing. I don't
think we can afford that.

Christian

-- 
Christian Theune · c...@gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
___
Zope-Dev maillist  -  Zope-Dev@zope.org
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 )


Re: [Zope-dev] Move implementation of getParent to zope.location?

2009-08-25 Thread Martijn Faassen
Thomas Lotze wrote:
> Martijn Faassen wrote:
> 
>> One question to ask is whether getParent and getParents are used all over
>> the place or just by zope.traversing. If they're only used by
>> zope.traversing we might not want to move them to a more general place,
>> but perhaps we can even see about removing them.
> 
> getParent is used by a number of zope.app.* packages (apidoc, container,
> dependable, onlinehelp, preference, rotterdam, pythonpage, workflow). Its
> only other occurrence is in zope.traversing where it is defined, but not
> used.
> 
> getParents is used by zope.app.* packages as well (rotterdam, tree,
> workflow) and definitions of it occur in zope.location and
> zope.traversing, where it isn't used either, though.
> 
> Seeing this now, I agree to removing the functions provided nobody objects
> against removing parts of the API that might be depended on by client code
> out there. (Both functions are actually exported by zope.traversing.api.)

I think that means we can't remove it. I'd say move it.

Regards,

Martijn

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Move implementation of getParent to zope.location?

2009-08-12 Thread Jim Fulton
On Wed, Aug 12, 2009 at 5:56 AM, Thomas Lotze wrote:
> Jim Fulton  schrieb:
>
>> I object to removing API functions that client code might use. (Was
>> that a trick questions?) What is the point of this exercise?
>
> Sorry, this message shouldn't have been sent in the state it was.
>
> The original point of the exercise was to clean up the situation where
> the two closely related functions aren't part of the same APIs. Then I
> responded to the suggestion of removing the functions, noticing two
> things as I wrote: the functions are used by zope.app packages, and
> they are part of zope.traversing.api but not used by anything
> non-zope.app. As api-style modules have been questioned in the past, I
> wanted to raise the issue whether the functions are meant to remain
> part of that module or live in the ILocationInfo interface alone, but I
> got distracted at that point and for some reason sent the message,
> which I shouldn't have done.
>
> If the functions remain in the api module, the remaining issue would be
> whether to move the implementation of getParent to zope.location and
> thus treat it like getParents.

Right. I understood this in the original proposal. Given that it
doesn't break the existing API, I have no major problem with it, which
is why I didn't bother to respond in the first place.  I have a small
problem that it fattens an existing API. I have a larger problem that
we are wasting time on this. The cleanup doesn't seem worth it to me.
I especially don't like that *I'm* spending time on this rather than,
say, working on the kgs or our buildout discussions.

Jim

-- 
Jim Fulton
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Move implementation of getParent to zope.location?

2009-08-12 Thread Jim Fulton
On Wed, Aug 12, 2009 at 3:26 AM, Thomas Lotze wrote:
...
> getParent is used by a number of zope.app.* packages (apidoc, container,
> dependable, onlinehelp, preference, rotterdam, pythonpage, workflow). Its
> only other occurrence is in zope.traversing where it is defined, but not
> used.
>
> getParents is used by zope.app.* packages as well (rotterdam, tree,
> workflow) and definitions of it occur in zope.location and
> zope.traversing, where it isn't used either, though.
>
> Seeing this now, I agree to removing the functions provided nobody objects
> against removing parts of the API that might be depended on by client code
> out there. (Both functions are actually exported by zope.traversing.api.)

I object to removing API functions that client code might use. (Was
that a trick questions?) What is the point of this exercise?

Jim

-- 
Jim Fulton
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Move implementation of getParent to zope.location?

2009-08-12 Thread Thomas Lotze
Martijn Faassen wrote:

> One question to ask is whether getParent and getParents are used all over
> the place or just by zope.traversing. If they're only used by
> zope.traversing we might not want to move them to a more general place,
> but perhaps we can even see about removing them.

getParent is used by a number of zope.app.* packages (apidoc, container,
dependable, onlinehelp, preference, rotterdam, pythonpage, workflow). Its
only other occurrence is in zope.traversing where it is defined, but not
used.

getParents is used by zope.app.* packages as well (rotterdam, tree,
workflow) and definitions of it occur in zope.location and
zope.traversing, where it isn't used either, though.

Seeing this now, I agree to removing the functions provided nobody objects
against removing parts of the API that might be depended on by client code
out there. (Both functions are actually exported by zope.traversing.api.)

-- 
Thomas



___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Move implementation of getParent to zope.location?

2009-08-06 Thread Martijn Faassen
Thomas Lotze wrote:
> There are two functions in zope.traversing.api, getParent and getParents,
> that are rather closely related. The former is implemented right in that
> module while the latter adapts its argument to
> zope.location.interfaces.ILocationInfo and calls getParents() on that.
> 
> Why is getParent not a part of ILocationInfo? If there's no good reason,
> I'd propose adding getParent() to the interface and changing the getParent
> function in zope.traversing to work similarly to getParents, i.e. call a
> method on an ILocationInfo adapter.

One question to ask is whether getParent and getParents are used all 
over the place or just by zope.traversing. If they're only used by 
zope.traversing we might not want to move them to a more general place, 
but perhaps we can even see about removing them.

But really, +1 to moving these functions to zope.location.

Regards,

Martijn

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Move implementation of getParent to zope.location?

2009-08-03 Thread Thomas Lotze
There are two functions in zope.traversing.api, getParent and getParents,
that are rather closely related. The former is implemented right in that
module while the latter adapts its argument to
zope.location.interfaces.ILocationInfo and calls getParents() on that.

Why is getParent not a part of ILocationInfo? If there's no good reason,
I'd propose adding getParent() to the interface and changing the getParent
function in zope.traversing to work similarly to getParents, i.e. call a
method on an ILocationInfo adapter.

-- 
Thomas



___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )