[Zope-Checkins] SVN: Zope/branches/jim-fix-zclasses/lib/python/transaction/__init__.py Changed to use methods of a threaded manager directly, rather than

Jim Fulton jim at zope.com
Fri Apr 1 06:24:27 EST 2005


Log message for revision 29774:
  Changed to use methods of a threaded manager directly, rather than
  through wrapper functions.
  

Changed:
  U   Zope/branches/jim-fix-zclasses/lib/python/transaction/__init__.py

-=-
Modified: Zope/branches/jim-fix-zclasses/lib/python/transaction/__init__.py
===================================================================
--- Zope/branches/jim-fix-zclasses/lib/python/transaction/__init__.py	2005-04-01 11:24:25 UTC (rev 29773)
+++ Zope/branches/jim-fix-zclasses/lib/python/transaction/__init__.py	2005-04-01 11:24:27 UTC (rev 29774)
@@ -20,18 +20,10 @@
 from transaction._manager import TransactionManager, ThreadTransactionManager
 
 manager = ThreadTransactionManager()
+get = manager.get
+begin = manager.begin
+commit = manager.commit
+abort = manager.abort
 
-def get():
-    return manager.get()
-
-def begin():
-    return manager.begin()
-
-def commit(sub=False):
-    manager.get().commit(sub)
-
-def abort(sub=False):
-    manager.get().abort(sub)
-
 # TODO: Issue deprecation warning if this variant is used?
 get_transaction = get



More information about the Zope-Checkins mailing list