[Zodb-checkins] SVN: ZODB/trunk/src/transaction/__init__.py Expand the deprecation warning for get_transaction() to cover

Tim Peters tim.one at comcast.net
Thu Mar 31 16:49:32 EST 2005


Log message for revision 29765:
  Expand the deprecation warning for get_transaction() to cover
  the most common cases (commit() and abort()) -- it's not really
  obvious that shortcut spelling exist for those.
  

Changed:
  U   ZODB/trunk/src/transaction/__init__.py

-=-
Modified: ZODB/trunk/src/transaction/__init__.py
===================================================================
--- ZODB/trunk/src/transaction/__init__.py	2005-03-31 20:42:54 UTC (rev 29764)
+++ ZODB/trunk/src/transaction/__init__.py	2005-03-31 21:49:32 UTC (rev 29765)
@@ -35,5 +35,7 @@
 
 def get_transaction():
     from ZODB.utils import deprecated36
-    deprecated36("   use transaction.get() instead of get_transaction()")
+    deprecated36("""   use transaction.get() instead of get_transaction().
+   transaction.commit() is a shortcut spelling of transaction.get().commit(),
+   and transaction.abort() of transaction.get().abort().""")
     return get()



More information about the Zodb-checkins mailing list