Commit 8c1d5a39 authored by sylvain.thenault@logilab.fr's avatar sylvain.thenault@logilab.fr
Browse files

no more used

--HG--
branch : tls-sprint
parent ed106bb2dcd3
...@@ -18,11 +18,25 @@ from cubicweb.vregistry import VRegistry, ObjectNotFound, NoSelectableObject ...@@ -18,11 +18,25 @@ from cubicweb.vregistry import VRegistry, ObjectNotFound, NoSelectableObject
_ = unicode _ = unicode
class DummyCursorError(Exception): pass def use_interfaces(obj):
class RaiseCursor: from cubicweb.selectors import implements
@classmethod try:
def execute(cls, rql, args=None, eid_key=None): # XXX deprecated
raise DummyCursorError() return sorted(obj.accepts_interfaces)
except AttributeError:
try:
impl = obj.__select__.search_selector(implements)
if impl:
return sorted(impl.expected_ifaces)
except AttributeError:
pass # old-style vobject classes with no accepts_interfaces
return ()
def expand_parent_classes(iface):
res = [iface]
for parent in iface.__bases__:
res += expand_parent_classes(parent)
return res
class CubicWebRegistry(VRegistry): class CubicWebRegistry(VRegistry):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment