# HG changeset patch # User RĂ©mi Cardona # Date 1433844340 -7200 # Node ID ef9607fac387242b600f7067fdd25615077abd97 # Parent bfd93cbd34a4aefa0dcd1946d58cc146e118b03e [predicates] Use proper deprecation mechanisms diff -r bfd93cbd34a4 -r ef9607fac387 predicates.py --- a/predicates.py Fri May 22 11:28:56 2015 +0200 +++ b/predicates.py Tue Jun 09 12:05:40 2015 +0200 @@ -188,6 +188,7 @@ from warnings import warn from operator import eq +from logilab.common.deprecation import deprecated from logilab.common.registry import Predicate, objectify_predicate, yes from yams.schema import BASE_TYPES, role_name @@ -195,12 +196,10 @@ from cubicweb import (Unauthorized, NoSelectableObject, NotAnEntity, CW_EVENT_MANAGER, role) -# even if not used, let yes here so it's importable through this module 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,) +yes = deprecated('[3.15] import yes() from use logilab.common.registry')(yes) # abstract predicates / mixin helpers ###########################################