Commit 8bd78d11 authored by Tim Peters's avatar Tim Peters

Merge rev 30547 from Zope-2_8-branch.

Use ZODB 3.4b3.

Stop using deprecated txn_mgr= argument; use
transaction_manager= instead.  Stop "illegal" use of
Connection's private ._txn_mgr attribute; use the new
public .transaction_manager attribute instead.
parent ed5cd1cf
...@@ -209,7 +209,7 @@ class ConnectionPatches: ...@@ -209,7 +209,7 @@ class ConnectionPatches:
# collector #1350: ensure that the connection is unregistered # collector #1350: ensure that the connection is unregistered
# from the transaction manager (XXX API method?) # from the transaction manager (XXX API method?)
if conn._synch: if conn._synch:
conn._txn_mgr.unregisterSynch(conn) conn.transaction_manager.unregisterSynch(conn)
# The mounted connection keeps a reference to # The mounted connection keeps a reference to
# its database, but nothing else. # its database, but nothing else.
......
...@@ -76,7 +76,7 @@ transaction manager so that we can use the second connection without ...@@ -76,7 +76,7 @@ transaction manager so that we can use the second connection without
creating a separate thread: creating a separate thread:
>>> tm2 = transaction.TransactionManager() >>> tm2 = transaction.TransactionManager()
>>> conn2 = some_database.open(txn_mgr=tm2) >>> conn2 = some_database.open(transaction_manager=tm2)
>>> app2 = conn2.root()['Application'] >>> app2 = conn2.root()['Application']
>>> test2 = app2.Control_Panel.Products['test'] >>> test2 = app2.Control_Panel.Products['test']
>>> c2 = test2.C() >>> c2 = test2.C()
......
...@@ -78,7 +78,7 @@ without having to use threads. ...@@ -78,7 +78,7 @@ without having to use threads.
>>> import transaction >>> import transaction
>>> tm = transaction.TransactionManager() >>> tm = transaction.TransactionManager()
>>> connection = some_database.open(txn_mgr=tm) >>> connection = some_database.open(transaction_manager=tm)
>>> connection.root()['C'] = C >>> connection.root()['C'] = C
>>> tm.commit() >>> tm.commit()
...@@ -125,7 +125,7 @@ Then the class will return to it's prior state: ...@@ -125,7 +125,7 @@ Then the class will return to it's prior state:
We can open another connection and access the class there. We can open another connection and access the class there.
>>> tm2 = transaction.TransactionManager() >>> tm2 = transaction.TransactionManager()
>>> connection2 = some_database.open(txn_mgr=tm2) >>> connection2 = some_database.open(transaction_manager=tm2)
>>> C2 = connection2.root()['C'] >>> C2 = connection2.root()['C']
>>> c2 = C2('other') >>> c2 = C2('other')
...@@ -245,8 +245,8 @@ connections to a variable first to prevent getting them from the ...@@ -245,8 +245,8 @@ connections to a variable first to prevent getting them from the
connection pool: connection pool:
>>> old = connection, connection2 >>> old = connection, connection2
>>> connection = some_database.open(txn_mgr=tm) >>> connection = some_database.open(transaction_manager=tm)
>>> connection2 = some_database.open(txn_mgr=tm2) >>> connection2 = some_database.open(transaction_manager=tm2)
Now, we can read the object: Now, we can read the object:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment