[Zope3-dev] delete IHomogenousContainer interface? (affects AuthenticationService, TranslationService)

Gary Poster gary@zope.com
Tue, 17 Dec 2002 10:45:58 -0500


I added the following interface to IContainer.py in the spring.  It was 
before the whole addable menu stuff we have now.  Jim added the (rather 
polite :-) comment, I think.

class IHomogenousContainer(Interface):

     # XXX this needs to be rethought a bit.
     def isAddable(interfaces):
         """Test for interface compatability for container and factory

         Tells you whether something that implements the given
         interfaces may be added to this container.

         The argument may be a single interface, a tuple of interfaces,
         or None, if the thing you're considering adding declares no
         interfaces.

         Returns a true value if an object that implements absolutely all
         of the given interfaces may be added to this container.
         Otherwise, returns false."""

This interface is now being used in the AuthenticationService and the 
TranslationService code.  isAddable is actually only called in test code 
for the AuthenticationService and nowhere else: it is not being used by 
any of the addable menu calls, nor, in fact, do the two services call 
isAddable themselves in their setObject code.

Should we (I'm offering) remove the interface and the implementations? 
I think it is a useful idea, but the addable menu thing goes a different 
direction, nothing uses it, and the Pope has raised a metaphorical 
eyebrow. :-)

Gary