Re: Re: SVN: Zope/trunk/lib/python/Testing/ZopeTestCase/ transaction.commit(1) is deprecated in favor of transaction.savepoint().

"Stefan H. Holek" <[email protected]> Fri, 4 Nov 2005 11:26:12 +0100
Newsgroups gmane.comp.web.zope.coders
Message-ID <[email protected]>
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