[server] Increase the stacklevel (due to @_open_only decorator)
authorRémi Cardona <remi.cardona@logilab.fr>
Fri, 23 Jan 2015 13:26:44 +0100
changeset 10171 f4f9bff9cf06
parent 10170 6530f628d2ef
child 10172 6cae0ffe7342
[server] Increase the stacklevel (due to @_open_only decorator)
server/session.py
--- a/server/session.py	Wed Jan 28 15:51:11 2015 +0100
+++ b/server/session.py	Fri Jan 23 13:26:44 2015 +0100
@@ -548,7 +548,7 @@
         return self._rewriter
 
     @_open_only
-    @deprecated('[3.19] use session or transaction data')
+    @deprecated('[3.19] use session or transaction data', stacklevel=3)
     def get_shared_data(self, key, default=None, pop=False, txdata=False):
         """return value associated to `key` in session data"""
         if txdata:
@@ -561,7 +561,7 @@
             return data.get(key, default)
 
     @_open_only
-    @deprecated('[3.19] use session or transaction data')
+    @deprecated('[3.19] use session or transaction data', stacklevel=3)
     def set_shared_data(self, key, value, txdata=False):
         """set value associated to `key` in session data"""
         if txdata: