zope.interface: adapter for ClassType doesn't work right
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Twisted |
New
|
Unknown
|
|||
Zope 3 |
Won't Fix
|
Medium
|
Lennart Regebro | ||
3.2 |
Won't Fix
|
Undecided
|
Unassigned | ||
3.3 |
Won't Fix
|
Undecided
|
Unassigned | ||
3.4 |
Won't Fix
|
Medium
|
Lennart Regebro | ||
zope.interface |
Won't Fix
|
Medium
|
Lennart Regebro |
Bug Description
The following example program shows that registering an adapter for ClassType doesn't work as it should, until after calling "declarations.
Forwarded from: http://
from zope.interface import Interface, declarations, adapter
import types
class IFoo(Interface): pass
class Bar: pass
class Baz: pass
def f1(obj): pass
def f2(obj): pass
ar=adapter.
ar.register(
ar.lookup1(
# result is None, expected f1
declarations.
ar.lookup1(
# Result is f1
Changed in twisted: | |
status: | Unknown → New |
Changed in zope.interface: | |
assignee: | nobody → Lennart Regebro (regebro-gmail) |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in zope3: | |
status: | Confirmed → Won't Fix |
tags: | added: bugday20100424 |
Changed in zope.interface: | |
status: | Confirmed → Won't Fix |
The behaviour described is still there. I don't know whether this is intended or not. It looks like it *might* not be intended.