#NEWLINE# def savepoint( self ) : #NEWLINE# #INDENT# '\n        Creates a savepoint (if supported and required by the backend) inside the\n        current transaction. Returns an identifier for the savepoint that will be\n        used for the subsequent rollback or commit.\n        ' #NEWLINE# thread_ident = thread . get_ident ( ) #NEWLINE# self . savepoint_state += 1 #NEWLINE# tid = str ( thread_ident ) . replace ( '-' , '' ) #NEWLINE# sid = ( 's%s_x%d' % ( tid , self . savepoint_state ) ) #NEWLINE# self . _savepoint ( sid ) #NEWLINE# return sid