The question says everything. Or am I trying to use zope.interface
for the wrong purpose?
What I need is basically the One Way To Do It for registering classes that implement a certain functionality (Widgets or Portlets for a CMS). Basically like django does with its ModelAdmin classes, but not automatic and not magic.
The simplest approach is to decorate
zope.interface.declarations.classImplements
(and its aliaszope.interface.classImplements
).Note that you must do this before the interfaces you want to catch are implemented, usually it's best to do this before importing anything else.