[Zodb-checkins] SVN: ZODB/trunk/src/Z Renamed DB.open to connection

Jim Fulton jim at zope.com
Thu Apr 30 07:43:41 EDT 2009


Log message for revision 99600:
  Renamed DB.open to connection
  

Changed:
  U   ZODB/trunk/src/ZEO/__init__.py
  U   ZODB/trunk/src/ZEO/tests/testZEO.py
  U   ZODB/trunk/src/ZODB/__init__.py
  U   ZODB/trunk/src/ZODB/tests/testDB.py

-=-
Modified: ZODB/trunk/src/ZEO/__init__.py
===================================================================
--- ZODB/trunk/src/ZEO/__init__.py	2009-04-30 11:43:39 UTC (rev 99599)
+++ ZODB/trunk/src/ZEO/__init__.py	2009-04-30 11:43:41 UTC (rev 99600)
@@ -25,15 +25,12 @@
     import ZEO.ClientStorage, ZODB
     return ZODB.DB(ZEO.ClientStorage.ClientStorage(*args, **kw))
 
-def open(*args, **kw):
+def connection(*args, **kw):
     db = DB(*args, **kw)
     conn = db.open()
     conn.onCloseCallback(db.close)
     return conn
 
-DB.open = open
-del open
-
 def server(path=None, blob_dir=None, storage_conf=None, zeo_conf=None,
            port=None):
     """Convenience function to start a server for interactive exploration

Modified: ZODB/trunk/src/ZEO/tests/testZEO.py
===================================================================
--- ZODB/trunk/src/ZEO/tests/testZEO.py	2009-04-30 11:43:39 UTC (rev 99599)
+++ ZODB/trunk/src/ZEO/tests/testZEO.py	2009-04-30 11:43:41 UTC (rev 99600)
@@ -1156,7 +1156,7 @@
     """Often, we just want to open a single connection.
 
     >>> addr, _ = start_server(path='data.fs')
-    >>> conn = ZEO.DB.open(addr)
+    >>> conn = ZEO.connection(addr)
     >>> conn.root()
     {}
 

Modified: ZODB/trunk/src/ZODB/__init__.py
===================================================================
--- ZODB/trunk/src/ZODB/__init__.py	2009-04-30 11:43:39 UTC (rev 99599)
+++ ZODB/trunk/src/ZODB/__init__.py	2009-04-30 11:43:41 UTC (rev 99600)
@@ -25,4 +25,4 @@
 
 del mapping, list, sys
 
-from DB import DB
+from DB import DB, connection

Modified: ZODB/trunk/src/ZODB/tests/testDB.py
===================================================================
--- ZODB/trunk/src/ZODB/tests/testDB.py	2009-04-30 11:43:39 UTC (rev 99599)
+++ ZODB/trunk/src/ZODB/tests/testDB.py	2009-04-30 11:43:41 UTC (rev 99600)
@@ -164,7 +164,7 @@
 def open_convenience():
     """Often, we just want to open a single connection.
 
-    >>> conn = ZODB.DB.open('data.fs')
+    >>> conn = ZODB.connection('data.fs')
     >>> conn.root()
     {}
 



More information about the Zodb-checkins mailing list