I have rolled a 'utilities.py' module for creating Zope3
interfaces from Zope2 interfaces; the theory is that the
existing Zope3 interfaces (and corresponding __implements__)
machinery can't be changed, but I'd like to reuse the APIs
in Five.
I am currently doing the wrapping in a Python module, e.g.::
from utilities import fromZ2Interface
from Products.CMFCore.interfaces.CachingPolicyManager \
import CachingPolicyManager as _IZ2_CachingPolicyManager
ICachingPolicyManager =
fromZ2Interface(_IZ2_CachingPolicyManager)
del _IZ2_CachingPolicyManager
However, this is noisy and boilerplate-filled; I would
prefer to be able to do this effort in ZCML.
Is the notion interesting to Five as a project?
|