Hi, I will start the developpement of the contextualisation of cursor, user and context inside a threading locale [1]. I would like to use the with statement (available in Python 2.6 by default and 2.5 (with "from __future__ import with_statement")) for this kind of purpose:
from trytond import transaction with transaction.set('user', 0): ... The 'user' will be restored at exit of the with statement. This will remove the support of Python 2.4. Is there any objection? [1] http://docs.python.org/library/threading.html#threading.local -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email/Jabber: cedric.kr...@b2ck.com Website: http://www.b2ck.com/
pgpLaYAlwIX8T.pgp
Description: PGP signature