diff --git a/redash/query_runner/google_spreadsheets.py b/redash/query_runner/google_spreadsheets.py index 3c22f45b7b..f14d2d446c 100644 --- a/redash/query_runner/google_spreadsheets.py +++ b/redash/query_runner/google_spreadsheets.py @@ -12,7 +12,6 @@ try: import gspread - from gspread.httpsession import HTTPSession from oauth2client.service_account import ServiceAccountCredentials enabled = True @@ -135,6 +134,10 @@ def __init__(self, configuration): @classmethod def annotate_query(cls): return False + + @classmethod + def name(cls): + return "Google Sheets" @classmethod def type(cls): @@ -166,9 +169,9 @@ def _get_spreadsheet_service(self): key = json_loads(b64decode(self.configuration['jsonKeyFile'])) creds = ServiceAccountCredentials.from_json_keyfile_dict(key, scope) - timeout_session = HTTPSession() + timeout_session = Session() timeout_session.requests_session = TimeoutSession() - spreadsheetservice = gspread.Client(auth=creds, http_session=timeout_session) + spreadsheetservice = gspread.Client(auth=creds, session=timeout_session) spreadsheetservice.login() return spreadsheetservice diff --git a/requirements_all_ds.txt b/requirements_all_ds.txt index f40320cc2a..5e827115ef 100644 --- a/requirements_all_ds.txt +++ b/requirements_all_ds.txt @@ -1,5 +1,5 @@ google-api-python-client==1.5.1 -gspread==0.6.2 +gspread==3.1.0 impyla==0.10.0 influxdb==2.7.1 MySQL-python==1.2.5