server/session.py
changeset 7990 a673d1d9a738
parent 7970 83075d897943
child 8090 0b5639aa2dac
equal deleted inserted replaced
7989:db76e8aaec29 7990:a673d1d9a738
  1252     @deprecated("[3.7] session is actual session")
  1252     @deprecated("[3.7] session is actual session")
  1253     def actual_session(self):
  1253     def actual_session(self):
  1254         """return the original parent session if any, else self"""
  1254         """return the original parent session if any, else self"""
  1255         return self
  1255         return self
  1256 
  1256 
  1257     @property
       
  1258     @deprecated("[3.6] use session.vreg.schema")
       
  1259     def schema(self):
       
  1260         return self.repo.schema
       
  1261 
       
  1262     @deprecated("[3.4] use vreg['etypes'].etype_class(etype)")
       
  1263     def etype_class(self, etype):
       
  1264         """return an entity class for the given entity type"""
       
  1265         return self.vreg['etypes'].etype_class(etype)
       
  1266 
       
  1267     @deprecated('[3.4] use direct access to session.transaction_data')
       
  1268     def query_data(self, key, default=None, setdefault=False, pop=False):
       
  1269         if setdefault:
       
  1270             assert not pop
       
  1271             return self.transaction_data.setdefault(key, default)
       
  1272         if pop:
       
  1273             return self.transaction_data.pop(key, default)
       
  1274         else:
       
  1275             return self.transaction_data.get(key, default)
       
  1276 
       
  1277     @deprecated('[3.4] use entity_from_eid(eid, etype=None)')
       
  1278     def entity(self, eid):
       
  1279         """return a result set for the given eid"""
       
  1280         return self.entity_from_eid(eid)
       
  1281 
       
  1282     # these are overridden by set_log_methods below
  1257     # these are overridden by set_log_methods below
  1283     # only defining here to prevent pylint from complaining
  1258     # only defining here to prevent pylint from complaining
  1284     info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
  1259     info = warning = error = critical = exception = debug = lambda msg,*a,**kw: None
  1285 
  1260 
  1286 
  1261