in a unittest I use transaction.begin() as follows: import transaction transaction.get().begin() I then get the following error: AttributeError: 'Transaction' object has no attribute 'begin' when I look at the code I am unsure whether transaction should have a begin method. If it does not exist anymore, by what is the method replaced? thanks robert
--On 16. Juni 2006 10:03:23 +0200 robert rottermann <robert@redcor.ch> wrote:
in a unittest I use transaction.begin() as follows:
import transaction transaction.get().begin()
I then get the following error: AttributeError: 'Transaction' object has no attribute 'begin'
when I look at the code I am unsure whether transaction should have a begin method.
If it does not exist anymore, by what is the method replaced?
Transaction.begin() was removed in ZODB 3.6 (and has been deprecated for a while). Possibly you're looking at different ZODB versions. -aj -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: info@zopyx.com - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope & Plone development, Consulting
Andreas Jung wrote:
--On 16. Juni 2006 10:03:23 +0200 robert rottermann <robert@redcor.ch> wrote:
in a unittest I use transaction.begin() as follows:
import transaction transaction.get().begin()
I then get the following error: AttributeError: 'Transaction' object has no attribute 'begin'
when I look at the code I am unsure whether transaction should have a begin method.
If it does not exist anymore, by what is the method replaced?
Transaction.begin() was removed in ZODB 3.6 (and has been deprecated for a while). Possibly you're looking at different ZODB versions.
-aj
thanks, in both transaction.__init__ and transaction.interfaces.ITransactionManager of Zope2.9 I found a begin method. robert
--On 16. Juni 2006 10:17:18 +0200 robert rottermann <robert@redcor.ch> wrote:
Andreas Jung wrote:
--On 16. Juni 2006 10:03:23 +0200 robert rottermann <robert@redcor.ch> wrote:
in a unittest I use transaction.begin() as follows:
import transaction transaction.get().begin()
I then get the following error: AttributeError: 'Transaction' object has no attribute 'begin'
when I look at the code I am unsure whether transaction should have a begin method.
If it does not exist anymore, by what is the method replaced?
Transaction.begin() was removed in ZODB 3.6 (and has been deprecated for a while). Possibly you're looking at different ZODB versions.
-aj
thanks, in both transaction.__init__ and transaction.interfaces.ITransactionManager of Zope2.9 I found a begin method.
THat's what the deprecation warning in ZODB 3.4/3.5 should have told you. -aj -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: info@zopyx.com - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope & Plone development, Consulting
robert rottermann wrote at 2006-6-16 10:03 +0200:
in a unittest I use transaction.begin() as follows:
import transaction transaction.get().begin()
I then get the following error: AttributeError: 'Transaction' object has no attribute 'begin'
when I look at the code I am unsure whether transaction should have a begin method.
If it does not exist anymore, by what is the method replaced?
It moved from the transaction to the transaction manager (what is resonable, as "begin" starts a *NEW* transaction). -- Dieter
participants (3)
-
Andreas Jung -
Dieter Maurer -
robert rottermann