[predicates] keep making `yes` predicate importable from cubicweb (closes #2790319) stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Mon, 08 Apr 2013 17:12:53 +0200
branchstable
changeset 8872 b638a99ab9cf
parent 8871 7d1ccaac5ae3
child 8873 280c32415059
[predicates] keep making `yes` predicate importable from cubicweb (closes #2790319) The `yes` predicate was moved out in CubicWeb 3.15 but it should have remained importable from the cubicweb.predicates module, for bw compat reasons and also because logilab.common.registry is an implementation detail.
predicates.py
--- a/predicates.py	Mon Apr 08 16:53:03 2013 +0200
+++ b/predicates.py	Mon Apr 08 17:12:53 2013 +0200
@@ -190,7 +190,7 @@
 
 from logilab.common.compat import all, any
 from logilab.common.interface import implements as implements_iface
-from logilab.common.registry import Predicate, objectify_predicate
+from logilab.common.registry import Predicate, objectify_predicate, yes
 
 from yams.schema import BASE_TYPES, role_name
 from rql.nodes import Function
@@ -201,6 +201,9 @@
 from cubicweb.uilib import eid_param
 from cubicweb.schema import split_expression
 
+# remember, these imports are there for bw compat only
+__BACKWARD_COMPAT_IMPORTS = (yes,)
+
 def score_interface(etypesreg, eclass, iface):
     """Return XXX if the give object (maybe an instance or class) implements
     the interface.