Re: [Zope-dev] Metaclass resolution for InterfaceClass

2011-06-01 Thread Laurence Rowe
On 1 May 2011 20:28, Laurence Rowe l...@lrowe.co.uk wrote:
 While experimenting with my InterfaceClass subclass I noticed that it
 was only being used when it was specified as the first of the bases. I
 believe this is because InterfaceClass is not a subclass of ``type``,
 so the normal metaclass derivation logic is not applied. The attached
 patch implements that logic in InterfaceClass.__new__, picking from
 the base metaclasses that metaclass which subclasses all other base
 metaclasses.

I've reported this as
https://bugs.launchpad.net/zope.interface/+bug/791218 so it does not
get lost.

Laurence
___
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 )


[Zope-dev] Metaclass resolution for InterfaceClass

2011-05-01 Thread Laurence Rowe
While experimenting with my InterfaceClass subclass I noticed that it
was only being used when it was specified as the first of the bases. I
believe this is because InterfaceClass is not a subclass of ``type``,
so the normal metaclass derivation logic is not applied. The attached
patch implements that logic in InterfaceClass.__new__, picking from
the base metaclasses that metaclass which subclasses all other base
metaclasses.

Laurence


metaclass_resolution.diff
Description: Binary data
___
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 )