wikkid not compatible with zope.interface 4.0.1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Wikkid Wiki |
New
|
Undecided
|
Unassigned |
Bug Description
The build of wikkid 0.1+bzr69 fails with zope.interface 4.0.1 (as will be the case in Ubuntu 13.04). The reason is that register_view() is making incorrect assumptions about whether the key is in _VIEW_REGISTRY or not, based on this bug in an earlier version of zope.interface: LP: #570942
=======
ERROR: wikkid.
-------
Traceback (most recent call last):
File "wikkid/
register_
File "wikkid/
assert key not in _VIEW_REGISTRY, "key already registered: %r" % key
TypeError: not all arguments converted during string formatting
=======
ERROR: wikkid.
-------
Traceback (most recent call last):
File "wikkid/
class AView(BaseView):
File "wikkid/
register_
File "wikkid/
assert key not in _VIEW_REGISTRY, "key already registered: %r" % key
TypeError: Error when calling the metaclass bases
not all arguments converted during string formatting
That actually masks the real problem, which is that the assertion is failing. So the immediate fix is to change the assert line to:
assert key not in _VIEW_REGISTRY, "key already registered: %r" % (key,)
since key is a tuple. Of course, you'll just get a different failure in the same tests, and this is why:
when register_view() is called inside test_interface_
In the fixed z.i 4.0.1, the equality test properly passes, thus the assertion itself fails.
I believe the reason is that the tests pollute _VIEW_REGISTRY and don't clean up after themselves, but I'm not positive about this. For now, wikkid will be broken in Raring, but I'm happy to sponsor a fix if you have one.