[Checkins] SVN: zope.location/trunk/ * Add ``getParents`` method to the ILocationInfo (it's actually used by zope.traversing, but was not added to the interface).

Dan Korostelev nadako at gmail.com
Tue Feb 3 04:41:22 EST 2009


2009/2/3 Christian Theune <ct at gocept.com>:
> On Mon,  2 Feb 2009 05:59:26 -0500 (EST)
> Dan Korostelev <nadako at gmail.com> wrote:
>
>> Log message for revision 95958:
>>   * Add ``getParents`` method to the ILocationInfo (it's actually
>> used by zope.traversing, but was not added to the interface).
>>   * Beautify doctests and add some more doctests to improve coverage.
>>   * Add coverage-test and coverage-report to the buildout.
>>   * Make ``getName`` method of ILocationInfo adapter return u'' for
>> the root object.
>
> Actually the getName method should be removed. It was there because
> zope.traversing did not depend on ILocation before and thus had no
> knowledge of __name__. The ILocationInfo (which before was
> IPhysicallyLocatable IIRC) says that it works on locations (which
> IPhysicallyLocatable did before) so we already have access to __name__.
>

Well, we can't just remove a method - many packages (in zope.* as
well) use it, however I also think that getName is bogus :) Let's
deprecate it?

> Interestingly enough the __name__ of the root will be None.

The more interesting thing that IRoot may be non-ILocation object. The
interface inherits from simple zope.interface.Interface and it's
implemented by non-location objects for example in zope.app.apidoc. So
I extracted the RootPhysicallyLocatable next to
LocationPhysicallyLocatable (like it was before, but now in
zope.location) in last commits.

-- 
WBR, Dan Korostelev


More information about the Checkins mailing list