10 from logilab.common.deprecation import deprecated, class_moved |
10 from logilab.common.deprecation import deprecated, class_moved |
11 |
11 |
12 from cubicweb import RepositoryError |
12 from cubicweb import RepositoryError |
13 |
13 |
14 |
14 |
15 @deprecated('[3.5] entity_name is deprecated, use entity.name') |
15 @deprecated('[3.6] entity_name is deprecated, use entity.name') |
16 def entity_name(session, eid): |
16 def entity_name(session, eid): |
17 """return the "name" attribute of the entity with the given eid""" |
17 """return the "name" attribute of the entity with the given eid""" |
18 return session.entity_from_eid(eid).name |
18 return session.entity_from_eid(eid).name |
19 |
19 |
20 @deprecated('[3.5] rproperty is deprecated, use session.schema_rproperty') |
20 @deprecated('[3.6] rproperty is deprecated, use session.schema_rproperty') |
21 def rproperty(session, rtype, eidfrom, eidto, rprop): |
21 def rproperty(session, rtype, eidfrom, eidto, rprop): |
22 return session.rproperty(rtype, eidfrom, eidto, rprop) |
22 return session.rproperty(rtype, eidfrom, eidto, rprop) |
23 |
23 |
24 from cubicweb.server.hook import SendMailOp |
24 from cubicweb.server.hook import SendMailOp |
25 from cubicweb.hooks.workflow import previous_state |
|
26 SendMailOp = class_moved(SendMailOp) |
25 SendMailOp = class_moved(SendMailOp) |
27 previous_state = deprecated('[3.5] use cubicweb.hooks.workflow.previous_state')(previous_state) |
|