Can't browse instances of classes that use zope.interface.implementsOnly()
Bug #1185175 reported by
Marius Gedminas
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ZODB Browser |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Here's a failing test that demonstrates the bug.
To post a comment you must log in.
Apparently when you have
class IFoo(Interface):
pass
class Foo(object):
implements( IFoo)
class IBar(Interface):
pass
class Bar(Foo):
implementsOnly (IBar)
and when you register an adapter
class FooAdapter(object):
implements( ISomething)
adapts(Foo)
then you can't use ISomething(Bar()) -- implementsOnly makes it forget not just the inherited interfaces, but also all the base classes! Is that intentional?