Commit 057ac364 authored by Tim Peters's avatar Tim Peters

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.
parent 6185d194
......@@ -25,6 +25,12 @@ ZODB/component.xml
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?
============================================
......
......@@ -263,7 +263,7 @@ class Transaction(object):
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
......
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