repoapi.py
changeset 9813 c20956f5862d
parent 9774 b7b71be569cf
child 10087 ed0b076c119b
equal deleted inserted replaced
9812:122c0b6a82a3 9813:c20956f5862d
   146     # attributes that may be overriden per connection instance
   146     # attributes that may be overriden per connection instance
   147     anonymous_connection = False # XXX really needed ?
   147     anonymous_connection = False # XXX really needed ?
   148     is_repo_in_memory = True # BC, always true
   148     is_repo_in_memory = True # BC, always true
   149 
   149 
   150     def __init__(self, session, autoclose_session=False):
   150     def __init__(self, session, autoclose_session=False):
       
   151         super(ClientConnection, self).__init__(session.vreg)
   151         self._session = session # XXX there is no real reason to keep the
   152         self._session = session # XXX there is no real reason to keep the
   152                                 # session around function still using it should
   153                                 # session around function still using it should
   153                                 # be rewritten and migrated.
   154                                 # be rewritten and migrated.
   154         self._cnx = None
   155         self._cnx = None
   155         self._open = None
   156         self._open = None
   156         self._web_request = False
   157         self._web_request = False
   157         #: cache entities built during the connection
   158         #: cache entities built during the connection
   158         self._eid_cache = {}
   159         self._eid_cache = {}
   159         self.vreg = session.vreg
       
   160         self._set_user(session.user)
   160         self._set_user(session.user)
   161         self._autoclose_session = autoclose_session
   161         self._autoclose_session = autoclose_session
   162 
   162 
   163     def __enter__(self):
   163     def __enter__(self):
   164         assert self._open is None
   164         assert self._open is None