Can't browse instances of classes that use zope.interface.implementsOnly()

Bug #1185175 reported by Marius Gedminas on 2013-05-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ZODB Browser
Undecided
Unassigned

Bug Description

Here's a failing test that demonstrates the bug.

Marius Gedminas (mgedmin) wrote :
Marius Gedminas (mgedmin) wrote :

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):
        adapts(Foo)
        implements(ISomething)

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?

Marius Gedminas (mgedmin) wrote :

Partial fix for this committed in 8ed0dfb.

Changed in zodbbrowser:
status: New → In Progress
Marius Gedminas (mgedmin) wrote :

Correction: partial fix is in 729ef6d (I had to git commit --amend to fix a broken unrelated test).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers