# HG changeset patch # User Pierre-Yves David # Date 1372353974 -7200 # Node ID 9aaf8472bad0e8aa81f587e9f971aaaf0063386a # Parent d1d4b3669e41eebc4145382b5c34dc32a1fe4db3 [repoapi] deprecate dbapi compat method diff -r d1d4b3669e41 -r 9aaf8472bad0 repoapi.py --- a/repoapi.py Thu Jun 27 19:14:22 2013 +0200 +++ b/repoapi.py Thu Jun 27 19:26:14 2013 +0200 @@ -17,6 +17,9 @@ # with CubicWeb. If not, see . """Official API to access the content of a repository """ + +from logilab.common.deprecation import deprecated + from cubicweb.utils import parse_repo_uri from cubicweb import ConnectionError, ProgrammingError, AuthenticationError from uuid import uuid4 @@ -330,25 +333,25 @@ # Connection object return self._cnx.repo.system_source.undo_transaction(self._cnx, txuuid) + @deprecated('[4.0] This is a repoapi.ClientConnection object not a dbapi one') def request(self): - # XXX This is DBAPI compatibility method. Deprecate it ASAP. return self + @deprecated('[4.0] This is a repoapi.ClientConnection object not a dbapi one') def cursor(self): - # XXX This is DBAPI compatibility method. Deprecate it ASAP. return self @ property + @deprecated('[4.0] This is a repoapi.ClientConnection object not a dbapi one') def sessionid(self): - # XXX This is DBAPI compatibility property. Deprecate it ASAP. return self._session.id @property + @deprecated('[4.0] This is a repoapi.ClientConnection object not a dbapi one') def connection(self): - # XXX This is DBAPI compatibility property. Deprecate it ASAP. return self @property + @deprecated('[4.0] This is a repoapi.ClientConnection object not a dbapi one') def _repo(self): - # XXX This is DBAPI compatibility property. Deprecate it ASAP. return self._session.repo