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

Bug #1185175 reported by Marius Gedminas
6
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.

Revision history for this message
Marius Gedminas (mgedmin) wrote :
Revision history for this message
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?

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Partial fix for this committed in 8ed0dfb.

Changed in zodbbrowser:
status: New → In Progress
Revision history for this message
Marius Gedminas (mgedmin) wrote :

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

Revision history for this message
Marius Gedminas (mgedmin) wrote :

This should be fixed in 0.16.3.

Changed in zodbbrowser:
status: In Progress → Fix Committed
Revision history for this message
Marius Gedminas (mgedmin) wrote :

0.16.3 became 0.17.

Changed in zodbbrowser:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.