Package transaction
[hide private]
[frames] | no frames]

Source Code for Package transaction

 1  ############################################################################ 
 2  # 
 3  # Copyright (c) 2001, 2002, 2004 Zope Corporation and Contributors. 
 4  # All Rights Reserved. 
 5  # 
 6  # This software is subject to the provisions of the Zope Public License, 
 7  # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution. 
 8  # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED 
 9  # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
10  # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS 
11  # FOR A PARTICULAR PURPOSE. 
12  # 
13  ############################################################################ 
14  """Exported transaction functions. 
15   
16  $Id: __init__.py 30129 2005-04-24 01:29:02Z jim $ 
17  """ 
18   
19  from transaction._transaction import Transaction 
20  from transaction._manager import TransactionManager, ThreadTransactionManager 
21   
22  manager = ThreadTransactionManager() 
23  get = manager.get 
24  begin = manager.begin 
25  commit = manager.commit 
26  abort = manager.abort 
27  savepoint = manager.savepoint 
28   
29 -def get_transaction():
30 from ZODB.utils import deprecated36 31 deprecated36(""" use transaction.get() instead of get_transaction(). 32 transaction.commit() is a shortcut spelling of transaction.get().commit(), 33 and transaction.abort() of transaction.get().abort().""") 34 return get()
35