[Zope3-dev] Interface.Implements module still broken for 2.2 metaclasses

Phillip J. Eby pje@telecommunity.com
Sun, 07 Jul 2002 16:13:39 -0400


The Interface.Implements module's getImplements() and 
getImplementsOfInstances() do not yield correct results for Python 2.2 
metaclass instances; that is, objects which inherit from 'type'.  The 
correction is straightforward, they need to use 'isinstance()'-based checks 
rather than 'type()' checks.  (And I have verified that they operate 
correctly with such a change.)  Unfortunately, I'm not sure that this can 
be properly backported to Python 2.1.

One other minor issue: Interface.__init__ does not import the 'Attribute' 
object, so code which expects to be able to use 'Interface.Attribute' 
breaks with the Zope3 version of the Interface package.