You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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://svn.zope.org/repos/main/zope.interface/branches/elro-metaclass-resolution 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.
I'm going to reverse myself and say that this behavior is not-a-bug. @lrowe, if you can come up with a backward-compatible mechanism which solves your usecase, please submit a PR.
In https://bugs.launchpad.net/zope.interface/+bug/791218, @lrowe reported:
The text was updated successfully, but these errors were encountered: