Bug: fixing async syntax for python 3.7 (#5759)

* Bug: fixing async syntax for python 3.7

Rename async to async_ so superset installs for python 3.7.

* Addressing PR comments. Use kwargs instead of explicitly specifying async_ so downstream engines (e.g. PyHive) that supports async can choose to use the async_ in pythonwq3.7 and async in <=python3.6

* addressing additional pr comments
This commit is contained in:
Christine Chambers
2018-08-28 17:40:45 -07:00
committed by Beto Dealmeida
parent 48d220c03a
commit ae3fb04036
3 changed files with 9 additions and 8 deletions

View File

@@ -172,7 +172,7 @@ def execute_sql(
cursor = conn.cursor()
logging.info('Running query: \n{}'.format(executed_sql))
logging.info(query.executed_sql)
db_engine_spec.execute(cursor, query.executed_sql, async=True)
db_engine_spec.execute(cursor, query.executed_sql, async_=True)
logging.info('Handling cursor')
db_engine_spec.handle_cursor(cursor, query, session)
logging.info('Fetching data: {}'.format(query.to_dict()))