#NEWLINE# def __init__( self , session , parent = None , nested = False ) : #NEWLINE# #INDENT# self . session = session #NEWLINE# self . _connections = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _parent = parent #NEWLINE# self . nested = nested #NEWLINE# self . _state = ACTIVE #NEWLINE# if ( ( not parent ) and nested ) : #NEWLINE# #INDENT# raise sa_exc . InvalidRequestError ( "Can't start a SAVEPOINT transaction when no existing transaction is in progress" ) #NEWLINE# #UNINDENT# if self . session . _enable_transaction_accounting : #NEWLINE# #INDENT# self . _take_snapshot ( ) #NEWLINE# #UNINDENT# if self . session . dispatch . after_transaction_create : #NEWLINE# #INDENT# self . session . dispatch . after_transaction_create ( self . session , self )