[session] Drop long deprecated [get/set]_shared_data methods 3.25
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 30 Mar 2017 11:59:01 +0200
branch3.25
changeset 12127 078265f222e3
parent 12126 be8636d12afd
child 12128 1a50be88dd0c
[session] Drop long deprecated [get/set]_shared_data methods they are deprecated since 3.19 and access to the .data attribute itself deprecated in 3.25, so it's time to drop them.
cubicweb/server/session.py
cubicweb/web/request.py
--- a/cubicweb/server/session.py	Thu Mar 30 11:58:02 2017 +0200
+++ b/cubicweb/server/session.py	Thu Mar 30 11:59:01 2017 +0200
@@ -398,28 +398,6 @@
     def rql_rewriter(self):
         return self._rewriter
 
-    @_open_only
-    @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:
-            data = self.transaction_data
-        else:
-            data = self.data
-        if pop:
-            return data.pop(key, default)
-        else:
-            return data.get(key, default)
-
-    @_open_only
-    @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:
-            self.transaction_data[key] = value
-        else:
-            self.data[key] = value
-
     def clear(self):
         """reset internal data"""
         self.transaction_data = {}
--- a/cubicweb/web/request.py	Thu Mar 30 11:58:02 2017 +0200
+++ b/cubicweb/web/request.py	Thu Mar 30 11:59:01 2017 +0200
@@ -961,8 +961,6 @@
     entity_metas = _cnx_func('entity_metas')  # XXX deprecated
     entity_type = _cnx_func('entity_type')
     source_defs = _cnx_func('source_defs')
-    get_shared_data = _cnx_func('get_shared_data')
-    set_shared_data = _cnx_func('set_shared_data')
 
     # security #################################################################