cubicweb/server/repository.py
changeset 12021 cc8135ecfbb8
parent 12016 88ed82a25f8a
child 12025 ba79f4a4f5d8
--- a/cubicweb/server/repository.py	Thu Mar 09 18:02:16 2017 +0100
+++ b/cubicweb/server/repository.py	Fri Mar 10 11:55:16 2017 +0100
@@ -48,7 +48,7 @@
                       UniqueTogetherError, onevent, ViolatedConstraint)
 from cubicweb import set_log_methods
 from cubicweb import cwvreg, schema, server
-from cubicweb.server import ShuttingDown, utils, hook, querier, sources
+from cubicweb.server import utils, hook, querier, sources
 from cubicweb.server.session import Session, InternalManager
 
 
@@ -700,10 +700,6 @@
     def connect(self, login, **kwargs):
         return self.new_session(login, **kwargs).sessionid
 
-    @deprecated('[3.23] use session.close() directly')
-    def close(self, sessionid):
-        self._get_session(sessionid).close()
-
     # session handling ########################################################
 
     def close_sessions(self):
@@ -738,16 +734,6 @@
             with cnx.security_enabled(read=False, write=False):
                 yield cnx
 
-    def _get_session(self, sessionid, txid=None, checkshuttingdown=True):
-        """return the session associated with the given session identifier"""
-        if checkshuttingdown and self.shutting_down:
-            raise ShuttingDown('Repository is shutting down')
-        try:
-            session = self._sessions[sessionid]
-        except KeyError:
-            raise BadConnectionId('No such session %s' % sessionid)
-        return session
-
     # data sources handling ###################################################
     # * correspondance between eid and type
     # * correspondance between eid and local id (i.e. specific to a given source)