[Zope-dev] New ways of getting transactions?

Andreas Jung lists at andreas-jung.com
Sun Dec 11 13:27:34 EST 2005



--On 11. Dezember 2005 12:28:04 -0500 Jim Fulton <jim at zope.com> wrote:

> Stefan H. Holek wrote:
>> import transaction
>> transaction.get()
>> transaction.commit()
>> transaction.abort()
>> transaction.savepoint()
>>
>> This works since 2.8, but not in 2.7. Nearly every project has come  up
>> with its own backward compatibility module though. See for example
>> CMFCore.utils.transaction or CMFPlone.transaction.
>
> I'm dispayed to hear this. :(  The old use of __builtins__.get_transaction
> should be deprecated and supported for a period of time.  If it isn't,
> then this

The deprecation warning in Zope 2.8 says:

-c:1: DeprecationWarning: This will be removed in ZODB 3.6:
   use transaction.get() instead of get_transaction().
   transaction.commit() is a shortcut spelling of 
transaction.get().commit(),
   and transaction.abort() of transaction.get().abort().

Zope 2.9 comes with ZODB 3.6. So the behaviour is correct in some way but I 
agree that the deprecation should continue longer. It would be save to 
remove it in Zope 2.10.

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20051211/ad83f72e/attachment.bin


More information about the Zope-Dev mailing list