Re: [Zope-dev] when did transaction lose the ability to be usable as a context manager?

2013-02-06 Thread Duncan Booth
Chris Withers ch...@simplistix.co.uk wrote: Hi All, I used to do this: import transaction with transaction: ... print 'hello' ... Traceback (most recent call last): File console, line 1, in module AttributeError: __exit__ When did that stop working and what should I now do

Re: [Zope-dev] when did transaction lose the ability to be usable as a context manager?

2013-02-06 Thread Wichert Akkerman
On Feb 6, 2013, at 11:54 , Duncan Booth duncan.bo...@suttoncourtenay.org.uk wrote: Chris Withers ch...@simplistix.co.uk wrote: Hi All, I used to do this: import transaction with transaction: ... print 'hello' ... Traceback (most recent call last): File console, line 1, in

Re: [Zope-dev] when did transaction lose the ability to be usable as a context manager?

2013-02-06 Thread Chris Withers
On 06/02/2013 11:47, Wichert Akkerman wrote: You can also use the transaction manager directly instead of the bound methods transaction lifts out of it: import transaction with transaction.manager: pass yeah, this is what I'll do. Chris -- Simplistix - Content Management, Batch