[Zodb-checkins] SVN: ZODB/trunk/ Merge rev 27695 from 3.3 branch.
Tim Peters
tim.one at comcast.net
Mon Sep 27 15:46:49 EDT 2004
Log message for revision 27696:
Merge rev 27695 from 3.3 branch.
Transaction.begin().
When raising DeprecationWarning, point the warning machinery at
the caller, not at Transaction.begin() itself. As is (voice
of experience <wink>), these warnings are darned near useless to
track down code that needs to be changed on Zope trunk. With the
change, the warnings point directly at the deprecated uses.
Changed:
U ZODB/trunk/NEWS.txt
U ZODB/trunk/src/transaction/_transaction.py
-=-
Modified: ZODB/trunk/NEWS.txt
===================================================================
--- ZODB/trunk/NEWS.txt 2004-09-27 19:45:14 UTC (rev 27695)
+++ ZODB/trunk/NEWS.txt 2004-09-27 19:46:48 UTC (rev 27696)
@@ -25,7 +25,13 @@
type ``byte-size``. This allows you to specify, for example,
"``cache-size 20MB``" to get a 20 megabyte cache.
+transaction
+-----------
+The deprecation warning for ``Transaction.begin()`` was changed to
+point to the caller, instead of to ``Transaction.begin()`` itself.
+
+
What's new in ZODB3 3.3 release candidate 1?
============================================
Release date: 14-Sep-2004
Modified: ZODB/trunk/src/transaction/_transaction.py
===================================================================
--- ZODB/trunk/src/transaction/_transaction.py 2004-09-27 19:45:14 UTC (rev 27695)
+++ ZODB/trunk/src/transaction/_transaction.py 2004-09-27 19:46:48 UTC (rev 27696)
@@ -263,7 +263,7 @@
def begin(self):
warnings.warn("Transaction.begin() should no longer be used; use "
"the begin() method of a transaction manager.",
- DeprecationWarning)
+ DeprecationWarning, stacklevel=2)
if (self._resources or
self._sub or
self._nonsub or
More information about the Zodb-checkins
mailing list