def make_psycopg_green():
 if (not hasattr(extensions, 'set_wait_callback')):
  raise ImportError(('support for coroutines not available in this Psycopg version (%s)' % psycopg2.__version__))
 extensions.set_wait_callback(gevent_wait_callback)

def make_psycopg_green ( ) : if ( not hasattr ( extensions , 'set_wait_callback' ) ) : raise ImportError ( ( 'support for coroutines not available in this Psycopg version (%s)' % psycopg2 . __version__ ) ) extensions . set_wait_callback ( gevent_wait_callback )
configure psycopg to be used with gevent in non-blocking way .