[z3-five] Five's bbb/transaction.py
Tarek Ziadé
tziade at nuxeo.com
Tue Jul 19 16:35:25 CEST 2005
Tarek Ziadé wrote:
>Hello,
>
>My application under five uses zope.app.mail.delivery wich does imports
>on z3's transactions.py
>so I have a collision with Five's bbb/transaction.py
>
>Since it's just for Monkey patching and local use can we rename it or
>change it ?
>so oher parts of z3 transaction are available.
>
>Regards,
>
>Tarek
>
>
I have changed bbb/transaction.py to bbb/transaction_patch.py
and changed monkey.py :
===================================================================
--- monkey.py (revision 14762)
+++ monkey.py (working copy)
@@ -53,5 +53,9 @@
import Zope2
except ImportError:
import sys
- from Products.Five.bbb import transaction
- sys.modules['transaction'] = transaction
+ import transaction
+ from Products.Five.bbb import transaction_patch
+ transaction.begin = transaction_patch.begin
+ transaction.commit = transaction_patch.commit
+ transaction.abort = transaction_patch.abort
It seems to work fine for me (didn't add any extra test within Five
though) . Do you think this looks ok ?
Tarek
--
Tarek Ziadé, Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM : http://www.z3lab.org
mail: tziade at nuxeo.com; tel: +33 (0) 6 30 37 02 63
More information about the z3-five
mailing list