#NEWLINE# def connect( self , config ) : #NEWLINE# #INDENT# connection = self . get_api ( ) . connect ( connection_factory = psycopg2 . extras . DictConnection , ** self . get_config ( self ) ) #NEWLINE# if config . get ( 'use_unicode' , True ) : #NEWLINE# #INDENT# extensions . register_type ( extensions . UNICODE , connection ) #NEWLINE# extensions . register_type ( extensions . UNICODEARRAY , connection ) #NEWLINE# #UNINDENT# connection . autocommit = True #NEWLINE# return connection