Normal metaclass resolution not applied to InterfaceClass

Bug #791218 reported by Laurence Rowe on 2011-06-01
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Won't Fix

Bug Description

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 branch at svn+ssh:// implements that logic in InterfaceClass.__new__, picking from the base metaclasses that metaclass which subclasses all other base metaclasses.

The motivating factor here is: I need an Interface with a hook that gets called after InterfaceClass.__init__ to allow for:

  * Checking that field names supplied as tagged values from directives correspond to actual field names to detect typos.

  * Registering the Interface instance for further configuration to be executed by a zope.configuration action.

Relevant changeset:

Example InterfaceClass subclass:

Tres Seaver (tseaver) wrote :
Changed in zope.interface:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers