--- a/dbapi.py Thu Jan 10 22:51:10 2013 +0100
+++ b/dbapi.py Thu Jan 10 22:52:47 2013 +0100
@@ -132,7 +132,7 @@
raise ConnectionError('unknown protocol: `%s`' % method)
-def repo_connect(repo, login, **kwargs):
+def _repo_connect(repo, login, **kwargs):
"""Constructor to create a new connection to the given CubicWeb repository.
Returns a Connection instance.
@@ -233,7 +233,7 @@
vreg.set_schema(schema)
else:
vreg = None
- cnx = repo_connect(repo, login, cnxprops=cnxprops, **kwargs)
+ cnx = _repo_connect(repo, login, cnxprops=cnxprops, **kwargs)
cnx.vreg = vreg
return cnx
@@ -253,7 +253,7 @@
"""
# connection to the CubicWeb repository
repo = in_memory_repo(config)
- return repo, repo_connect(repo, login, **kwargs)
+ return repo, _repo_connect(repo, login, **kwargs)
# XXX web only method, move to webconfig?
def anonymous_session(vreg):
@@ -267,7 +267,7 @@
anon_login, anon_password = anoninfo
# use vreg's repository cache
repo = vreg.config.repository(vreg)
- anon_cnx = repo_connect(repo, anon_login, password=anon_password)
+ anon_cnx = _repo_connect(repo, anon_login, password=anon_password)
anon_cnx.vreg = vreg
return DBAPISession(anon_cnx, anon_login)
@@ -877,4 +877,4 @@
return self._repo.undo_transaction(self.sessionid, txuuid,
**self._txid())
-in_memory_cnx = deprecated('[3.16] use repo_connect instead)')(repo_connect)
+in_memory_cnx = deprecated('[3.16] use _repo_connect instead)')(_repo_connect)