Skip to content

Commit 0ebc120

Browse files
author
Chris Grinolds
committed
Updated BigQuery connector to no longer use deprecated ```oauth2client.tools.run() (#8327)
1 parent 86b2664 commit 0ebc120

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/source/whatsnew/v0.16.1.txt

+1
Original file line numberDiff line numberDiff line change
@@ -256,3 +256,4 @@ Bug Fixes
256256
- Bug in ``transform`` and ``filter`` when grouping on a categorical variable (:issue:`9921`)
257257
- Bug in ``transform`` when groups are equal in number and dtype to the input index (:issue:`9700`)
258258
- Google BigQuery connector now imports dependencies on a per-method basis.(:issue:`9713`)
259+
- Updated BigQuery connector to no longer use deprecated ```oauth2client.tools.run()``` (:issue:`8327`)

pandas/io/gbq.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def get_credentials(self):
9292
try:
9393
from oauth2client.client import OAuth2WebServerFlow
9494
from oauth2client.file import Storage
95-
from oauth2client.tools import run
95+
from oauth2client.tools import run_flow, argparser
9696

9797
except ImportError:
9898
raise ImportError('Could not import Google API Client.')
@@ -108,7 +108,7 @@ def get_credentials(self):
108108
credentials = storage.get()
109109

110110
if credentials is None or credentials.invalid or self.reauth:
111-
credentials = run(flow, storage)
111+
credentials = run_flow(flow, storage, argparser.parse_args([]))
112112

113113
return credentials
114114

0 commit comments

Comments
 (0)