Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade gspread 3.1.0 for supporting team drive #3838

Merged
merged 4 commits into from
Jun 6, 2019
Merged

Upgrade gspread 3.1.0 for supporting team drive #3838

merged 4 commits into from
Jun 6, 2019

Conversation

koooge
Copy link
Contributor

@koooge koooge commented May 28, 2019

Hi there ✋

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • New Query Runner (Data Source)
  • New Alert Destination
  • Other

Description

google spreadsheet on team drive was not supported by redash due to using old API version of google API. So, upgrade gspread to the latest version.

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Copy link
Member

@arikfr arikfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening this pull request. Please see comment about timeout.

Also in #2608 it was mentioned that v3 drops support for the API we're using: was this addressed in newer versions of gspread?

spreadsheetservice = gspread.Client(auth=creds, http_session=timeout_session)
spreadsheetservice.login()
return spreadsheetservice
return gspread.authorize(creds)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove the timeout handling?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops. Because gspread.httpsession was not found, but I will fix it

Traceback (most recent call last):
  File "main.py", line 2, in <module>
    from gspread.httpsession import HTTPSession
ModuleNotFoundError: No module named 'gspread.httpsession

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@koooge
Copy link
Contributor Author

koooge commented May 29, 2019

Also in #2608 it was mentioned that v3 drops support for the API we're using: was this addressed in newer versions of gspread?

gspread 3.0.0 drops v3 API https://github.com/burnash/gspread/releases. But I suppose we don't need mind it. We have to care changes of gspread's interface like HTTPSession basically.
Regarding team drive, it seems it's unstable and the period of transition in sheets API V3.
https://developers.google.com/sheets/api/v3/
Anyway, v3 is already deprecated

@arikfr arikfr merged commit c0e8ef3 into getredash:master Jun 6, 2019
@arikfr
Copy link
Member

arikfr commented Jun 6, 2019

Thanks!

@arikfr arikfr mentioned this pull request Jun 6, 2019
@koooge koooge deleted the google_team_drive branch June 6, 2019 10:34
harveyrendell pushed a commit to pushpay/redash that referenced this pull request Nov 14, 2019
* Upgrade gspread 3.1.0 for supporting team drive

Signed-off-by: koooge <[email protected]>

* Revert "Upgrade gspread 3.1.0 for supporting team drive"

This reverts commit e53e8cb.

* Upgrade gspread 3.1.0 for supporting team drive

Signed-off-by: koooge <[email protected]>

* Update Sheets query runner name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants