[devtools/testlib] remove dbapi backward-compat
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Thu, 05 Jun 2014 09:51:57 +0200
changeset 10335 88a4e4a60fce
parent 10334 3f6702218bac
child 10336 9c38f674e36f
[devtools/testlib] remove dbapi backward-compat Related to #3933480.
devtools/testlib.py
--- a/devtools/testlib.py	Fri Mar 13 16:11:35 2015 +0100
+++ b/devtools/testlib.py	Thu Jun 05 09:51:57 2014 +0200
@@ -431,59 +431,6 @@
         self._admin_clt_cnx.__enter__()
         self.config.repository = lambda x=None: self.repo
 
-    # db api ##################################################################
-
-    @nocoverage
-    @deprecated('[3.19] explicitly use RepoAccess object in test instead')
-    def cursor(self, req=None):
-        if req is not None:
-            return req.cnx
-        else:
-            return self.cnx
-
-    @nocoverage
-    @deprecated('[3.19] explicitly use RepoAccess object in test instead')
-    def execute(self, rql, args=None, req=None):
-        """executes <rql>, builds a resultset, and returns a couple (rset, req)
-        where req is a FakeRequest
-        """
-        req = req or self.request(rql=rql)
-        return req.execute(unicode(rql), args)
-
-    @nocoverage
-    @deprecated('[3.19] explicitly use RepoAccess object in test instead')
-    def commit(self):
-        try:
-            return self.cnx.commit()
-        finally:
-            self.session.set_cnxset() # ensure cnxset still set after commit
-
-    @nocoverage
-    @deprecated('[3.19] explicitly use RepoAccess object in test instead')
-    def rollback(self):
-        try:
-            self.cnx.rollback()
-        except ProgrammingError:
-            pass # connection closed
-        finally:
-            self.session.set_cnxset() # ensure cnxset still set after commit
-
-    @deprecated('[3.19] explicitly use RepoAccess object in test instead')
-    def request(self, rollbackfirst=False, url=None, headers={}, **kwargs):
-        """return a web ui request"""
-        if rollbackfirst:
-            self.cnx.rollback()
-        req = self.requestcls(self.vreg, url=url, headers=headers, form=kwargs)
-        req.set_cnx(self.cnx)
-        return req
-
-    # server side db api #######################################################
-
-    @deprecated('[3.19] explicitly use RepoAccess object in test instead')
-    def sexecute(self, rql, args=None):
-        self.session.set_cnxset()
-        return self.session.execute(rql, args)
-
 
     # config management ########################################################