[client-connection] add a sessionid property for dbapi compatibility
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Fri, 21 Jun 2013 13:42:19 +0200
changeset 9055 2567b7d04e49
parent 9054 d7e78645dab6
child 9056 e777be2c5007
[client-connection] add a sessionid property for dbapi compatibility To ease transition from dbapi to repoapi we need the ClientConnection to be as compatible as possible with the dbapi. Adding this method goes in this direction. It'll get deprecated in the deprecation wave that will conclude the repoapi refactoring. related to #2503918
repoapi.py
--- a/repoapi.py	Fri Jun 21 12:12:58 2013 +0200
+++ b/repoapi.py	Fri Jun 21 13:42:19 2013 +0200
@@ -295,3 +295,8 @@
     def cursor(self):
         # XXX This is DBAPI compatibility method. Deprecate it ASAP.
         return self
+
+    @ property
+    def sessionid(self):
+        # XXX This is DBAPI compatibility property. Deprecate it ASAP.
+        return self._session.id