server/sources/native.py
changeset 9466 c3a5f4507f12
parent 9465 86d4b41ae339
child 9467 ad66d7b3fd48
--- a/server/sources/native.py	Thu Jun 27 09:18:39 2013 +0200
+++ b/server/sources/native.py	Wed Jan 22 15:50:03 2014 +0100
@@ -59,7 +59,7 @@
 from cubicweb.cwconfig import CubicWebNoAppConfiguration
 from cubicweb.server import hook
 from cubicweb.server.utils import crypt_password, eschema_eid, verify_and_update
-from cubicweb.server.sqlutils import SQL_PREFIX, SQLAdapterMixIn, SqliteCnxLoggingWrapper
+from cubicweb.server.sqlutils import SQL_PREFIX, SQLAdapterMixIn
 from cubicweb.server.rqlannotation import set_qdata
 from cubicweb.server.hook import CleanupDeletedEidsCacheOp
 from cubicweb.server.edition import EditedEntity
@@ -287,17 +287,6 @@
         self._eid_creation_cnx = None
         # (etype, attr) / storage mapping
         self._storages = {}
-        # XXX no_sqlite_wrap trick since we've a sqlite locking pb when
-        # running unittest_multisources with the wrapping below
-        if self.dbdriver == 'sqlite' and \
-               not getattr(repo.config, 'no_sqlite_wrap', False):
-            from cubicweb.server.pool import ConnectionsSet
-            self.dbhelper.dbname = abspath(self.dbhelper.dbname)
-            self.get_connection = lambda: SqliteCnxLoggingWrapper(self)
-            self.check_connection = lambda cnx: cnx
-            def cnxset_freed(self):
-                self.cnx.close()
-            ConnectionsSet.cnxset_freed = cnxset_freed
         if self.dbdriver == 'sqlite':
             self._create_eid = None
             self.create_eid = self._create_eid_sqlite
@@ -334,7 +323,6 @@
         if self.do_fti:
             if cnxset is None:
                 _cnxset = self.repo._get_cnxset()
-                _cnxset.cnxset_set()
             else:
                 _cnxset = cnxset
             if not self.dbhelper.has_fti_table(_cnxset.cu):
@@ -1599,6 +1587,7 @@
         authinfo['email_auth'] = True
         return self.source.repo.check_auth_info(session, login, authinfo)
 
+
 class DatabaseIndependentBackupRestore(object):
     """Helper class to perform db backend agnostic backup and restore