mς €γΈEc@s^dZdkZdklZeƒZd„Zdefd„ƒYZdefd„ƒYZdS(s¦A TransactionManager controls transaction boundaries. It coordinates application code and resource managers, so that they are associated with the right transaction. N(s Transactioncs"|o|i‡d†ƒndS(Ncs |iˆƒS(N(tstnewTransactionttxn(R(R(t3/data/zmath/zope/lib/python/transaction/_manager.pyt1s(tsynchstmap(RR((RRt_new_transaction/stTransactionManagercBsbtZd„Zd„Zd„Zd„Zd„Zd„Zed„Z ed„Z e d „Z RS( NcCs&dkl}d|_|ƒ|_dS(N(sWeakSet(t ZODB.utilstWeakSettNonetselft_txnt_synchs(R R ((Rt__init__<s  cCsN|idj o|iiƒnt|i|ƒ}|_t||iƒ|S(N(R R R tabortt TransactionRRR(R R((RtbeginBs cCs0|idjot|i|ƒ|_n|iS(N(R R R RR(R ((RtgetIscCs$||ijpt‚d|_dS(N(RR R tAssertionErrorR (R R((RtfreeNscCs|ii|ƒdS(N(R Rtaddtsynch(R R((Rt registerSynchRscCs|ii|ƒdS(N(R RtremoveR(R R((RtunregisterSynchUscCsG|tjo d}ndkl}|dƒ|iƒi|dtƒS(N(s deprecated37s\subtransactions are deprecated; use transaction.savepoint() instead of transaction.commit(1)tdeprecation_wng( tsubt_markerR R t deprecated37R RtcommittFalse(R RR((RRXs     cCsG|tjo d}ndkl}|dƒ|iƒi|dtƒS(N(s deprecated37ssubtransactions are deprecated; use sp.rollback() instead of transaction.abort(1), where `sp` is the corresponding savepoint captured earlierR( RRR R RR RRR (R RR((RRbs     cCs|iƒi|ƒS(N(R Rt savepointt optimistic(R R"((RR!ms( t__name__t __module__RRRRRRRRRR R!(((RR:s       tThreadTransactionManagercBsDtZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(s`Thread-aware transaction manager. Each thread is associated with a unique transaction. cCsh|_h|_dS(N(R t_txnsR(R ((RRvs cCs¨tiƒ}|ii|ƒ}|dj o|iƒn|i i|ƒ}|djo%dk l }|ƒ}|i |