kill kick_registerer (actually moved to asteretud), fix _accepts_interface w/ new implements selector
--- a/common/registerers.py Tue Feb 17 21:40:10 2009 +0100
+++ b/common/registerers.py Tue Feb 17 21:42:06 2009 +0100
@@ -11,9 +11,12 @@
__docformat__ = "restructuredtext en"
from cubicweb.vregistry import registerer
-
+from cubicweb.selectors import implements
def _accepts_interfaces(obj):
+ impl = obj.__select__.search_selector(implements)
+ if impl:
+ return sorted(impl.expected_ifaces)
return sorted(getattr(obj, 'accepts_interfaces', ()))
@@ -54,17 +57,6 @@
def equivalent(self, other):
raise NotImplementedError(self, self.vobject)
-
-
-class kick_registerer(registerer):
- """systematically kick previous registered class and don't register the
- wrapped class. This is temporarily used to discard library object registrable
- but that we don't want to use
- """
- def do_it_yourself(self, registered):
- if registered:
- self.kick(registered, registered[-1])
- return
class accepts_registerer(priority_registerer):