mς TγΈEc@s>dZdklZlZdkZd„Zddd„ZdS(s3Tools to simplify transactions within applications.(sReadConflictErrors ConflictErrorNcCs2tiƒ}|o|i|ƒn|iƒdS(N(t transactiontgettttnotetcommit(RR((t,/data/zmath/zope/lib/python/ZODB/transact.pyt_commits ics‡‡‡d†}|S(s°Returns transactional version of function argument f. Higher-order function that converts a regular function into a transactional function. The transactional function will retry up to retries time before giving up. If note, it will be added to the transaction metadata when it commits. The retries occur on ConflictErrors. If some other TransactionError occurs, the transaction will not be retried. csΊˆ}x‘|o™|d8}yˆ||Ž}Wn0tj o$}ti ƒ|p‚q q nXyt ˆƒWn0t j o$}ti ƒ|p‚q q nX|Sq Wt dƒ‚dS(Niscouldn't commit transaction(tretriestntftargstkwargstrtReadConflictErrortmsgRtabortRRt ConflictErrort RuntimeError(R R RR R(RR R(Rtg's(    N(R(R RRR((R RRRttransacts (t__doc__tZODB.POSExceptionR RRRtNoneR(RR RRR((Rt?s