From e53e8cb75bc02a478c7f7d973beb0e559b7d6cae Mon Sep 17 00:00:00 2001 From: koooge Date: Wed, 22 May 2019 18:25:55 +0900 Subject: [PATCH] Upgrade gspread 3.1.0 for supporting team drive Signed-off-by: koooge --- redash/query_runner/google_spreadsheets.py | 7 +------ requirements_all_ds.txt | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/redash/query_runner/google_spreadsheets.py b/redash/query_runner/google_spreadsheets.py index 3c22f45b7b..c7fa482aa0 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 @@ -166,11 +165,7 @@ 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.requests_session = TimeoutSession() - spreadsheetservice = gspread.Client(auth=creds, http_session=timeout_session) - spreadsheetservice.login() - return spreadsheetservice + return gspread.authorize(creds) def test_connection(self): self._get_spreadsheet_service() 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