subscriber directive doesn't allow declaring provided interface in Python
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zope.component |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
The docs of zope.component (zcml.rst) say:
"""
Like the <adapter /> directive, the <subscriber /> directive can
figure out from the in-line Python declaration (using
``zope.
subscriber should be registered for:
"""
However, the examples following that piece of text don't demonstrate something like <subscriber factory="foo.bar" /> (with foo.bar being a declared in Python code to implement some unambiguous interface). In fact, adding the following test (analogous to Test_adapter.
def test_no_
from zope.interface import Interface
from zope.interface import implementer
from zope.component.
from zope.component.zcml import subscriber
class IFoo(Interface):
pass
class _Factory(object):
def __init__(self, context):
_cfg_ctx = _makeConfigCont
# Register the adapter
action = _cfg_ctx.
Now tracked on Github:
https:/ /github. com/zopefoundat ion/zope. component/ issues/ 9