[server/session] use _free_cnxset instead of free_cnxset to avoid warnings
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 29 Jan 2014 16:19:13 +0100
changeset 9495 0ae4e6d7ce2f
parent 9494 197b7a4ef544
child 9496 e699fbcc9a61
[server/session] use _free_cnxset instead of free_cnxset to avoid warnings No need to make DeprecationWarning noise for something the user doesn't have any control over.
server/session.py
--- a/server/session.py	Tue Jan 28 15:29:23 2014 +0100
+++ b/server/session.py	Wed Jan 29 16:19:13 2014 +0100
@@ -530,7 +530,7 @@
 
     def __exit__(self, exctype=None, excvalue=None, tb=None):
         assert self._open # actually already open
-        self.free_cnxset(ignoremode=True)
+        self._free_cnxset(ignoremode=True)
         self.clear()
         self._open = False
 
@@ -1047,7 +1047,7 @@
         finally:
             self._session_timestamp.touch()
             if free_cnxset:
-                self.free_cnxset(ignoremode=True)
+                self._free_cnxset(ignoremode=True)
             self.clear()
 
     @_open_only
@@ -1136,7 +1136,7 @@
         finally:
             self._session_timestamp.touch()
             if free_cnxset:
-                self.free_cnxset(ignoremode=True)
+                self._free_cnxset(ignoremode=True)
             self.clear()
 
     # resource accessors ######################################################
@@ -1618,7 +1618,7 @@
             pass
         else:
             if free_cnxset:
-                self.free_cnxset()
+                cnx._free_cnxset()
                 if cnx.ctx_count == 0:
                     self._close_cnx(cnx)
                 else: