# HG changeset patch # User Aurelien Campeas # Date 1365433973 -7200 # Node ID b638a99ab9cf045210c2a761da6c16c2ebddc746 # Parent 7d1ccaac5ae3de97ad1913173c7f030429d74a4f [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. diff -r 7d1ccaac5ae3 -r b638a99ab9cf 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.