[entity] improve deprecation messages

authorNicolas Chauvat <nicolas.chauvat@logilab.fr>
changesetc0b82dbcf6a3
branchstable
phasepublic
hiddenno
parent revision#e864c54bcf95 Added tags for version 3.16.4 on changeset 041804bc48e9
child revision#26fddf8d65d0 Fix documentation for zmq pub/sub hooks and configuration, #c947e3aa1586 Fix documentation for zmq pub/sub hooks and configuration
files modified by this revision
entity.py
# HG changeset patch
# User Nicolas Chauvat <nicolas.chauvat@logilab.fr>
# Date 1368800748 -7200
# Fri May 17 16:25:48 2013 +0200
# Branch stable
# Node ID c0b82dbcf6a3ecb7f917c15d7444fa724ce81663
# Parent e864c54bcf95e22bd853cb50c6a313e63d9956b3
[entity] improve deprecation messages

diff --git a/entity.py b/entity.py
@@ -1318,15 +1318,15 @@
1          for rqlexpr in self.e_schema.get_rqlexprs(action):
2              self._cw.local_perm_cache.pop((rqlexpr.eid, (('x', self.eid),)), None)
3 
4      # deprecated stuff #########################################################
5 
6 -    @deprecated('[3.16] use cw_set() instead')
7 +    @deprecated('[3.16] use cw_set() instead of set_attributes()')
8      def set_attributes(self, **kwargs): # XXX cw_set_attributes
9          self.cw_set(**kwargs)
10 
11 -    @deprecated('[3.16] use cw_set() instead')
12 +    @deprecated('[3.16] use cw_set() instead of set_relations()')
13      def set_relations(self, **kwargs): # XXX cw_set_relations
14          """add relations to the given object. To set a relation where this entity
15          is the object of the relation, use 'reverse_'<relation> as argument name.
16 
17          Values may be an entity or eid, a list of entities or eids, or None