[devtools/testlib] remove dbapi backward-compat

Related to #3933480.

authorAurelien Campeas <aurelien.campeas@logilab.fr>
changesetb982bd26e019
branchdefault
phasedraft
hiddenyes
parent revision#d115c388e9cf [test] fix copy-pasta in doc string
child revision#f5238d465eab [entity/req] pass the _cw object to cw_instantiate, #73c6cf04fd87 [shared data] remove get/set_shared_data api
files modified by this revision
devtools/testlib.py
# HG changeset patch
# User Aurelien Campeas <aurelien.campeas@logilab.fr>
# Date 1401954717 -7200
# Thu Jun 05 09:51:57 2014 +0200
# Node ID b982bd26e01966620dee7c2c3c2b72a886aa50a5
# Parent d115c388e9cf0a5edad97edc5d54b6aed14ba835
[devtools/testlib] remove dbapi backward-compat

Related to #3933480.

diff --git a/devtools/testlib.py b/devtools/testlib.py
@@ -429,63 +429,10 @@
1          self._admin_clt_cnx = repoapi.ClientConnection(self._admin_session)
2          self._cnxs.add(self._admin_clt_cnx)
3          self._admin_clt_cnx.__enter__()
4          self.config.repository = lambda x=None: self.repo
5 
6 -    # db api ##################################################################
7 -
8 -    @nocoverage
9 -    @deprecated('[3.19] explicitly use RepoAccess object in test instead')
10 -    def cursor(self, req=None):
11 -        if req is not None:
12 -            return req.cnx
13 -        else:
14 -            return self.cnx
15 -
16 -    @nocoverage
17 -    @deprecated('[3.19] explicitly use RepoAccess object in test instead')
18 -    def execute(self, rql, args=None, req=None):
19 -        """executes <rql>, builds a resultset, and returns a couple (rset, req)
20 -        where req is a FakeRequest
21 -        """
22 -        req = req or self.request(rql=rql)
23 -        return req.execute(unicode(rql), args)
24 -
25 -    @nocoverage
26 -    @deprecated('[3.19] explicitly use RepoAccess object in test instead')
27 -    def commit(self):
28 -        try:
29 -            return self.cnx.commit()
30 -        finally:
31 -            self.session.set_cnxset() # ensure cnxset still set after commit
32 -
33 -    @nocoverage
34 -    @deprecated('[3.19] explicitly use RepoAccess object in test instead')
35 -    def rollback(self):
36 -        try:
37 -            self.cnx.rollback()
38 -        except ProgrammingError:
39 -            pass # connection closed
40 -        finally:
41 -            self.session.set_cnxset() # ensure cnxset still set after commit
42 -
43 -    @deprecated('[3.19] explicitly use RepoAccess object in test instead')
44 -    def request(self, rollbackfirst=False, url=None, headers={}, **kwargs):
45 -        """return a web ui request"""
46 -        if rollbackfirst:
47 -            self.cnx.rollback()
48 -        req = self.requestcls(self.vreg, url=url, headers=headers, form=kwargs)
49 -        req.set_cnx(self.cnx)
50 -        return req
51 -
52 -    # server side db api #######################################################
53 -
54 -    @deprecated('[3.19] explicitly use RepoAccess object in test instead')
55 -    def sexecute(self, rql, args=None):
56 -        self.session.set_cnxset()
57 -        return self.session.execute(rql, args)
58 -
59 
60      # config management ########################################################
61 
62      @classproperty
63      def config(cls):