[Zope-Coders] Re: SVN: Zope/trunk/lib/python/Testing/ZopeTestCase/
transaction.commit(1) is deprecated in favor of
transaction.savepoint().
Stefan H. Holek
stefan at epy.co.at
Fri Nov 4 05:26:12 EST 2005
Thank you for the clarification, Tim.
On 3. Nov 2005, at 16:22, Tim Peters wrote:
> The full deprecation msg spells it out in more detail:
>
> subtransactions are deprecated; instead of transaction.commit
> (1), use
> transaction.savepoint(optimistic=True) in contexts where a
> subtransaction
> abort will never occur, or sp=transaction.savepoint() if later
> rollback is
> possible and then sp.rollback() instead of transaction.abort(1)
Last time *I* saw it, it said "subtransactions are deprecated; use
transaction.savepoint() instead of transaction.commit(1)" ;-)
> So, either way, the current code is a bit off target. Best guess is
> that you're not interested in *sub*transaction aborts here, so that
> you do want to pass optimistic=True.
This is correct. I will pass True then.
Stefan
--
Anything that happens, happens. --Douglas Adams
More information about the Zope-Coders
mailing list