WARNING:googleapiclient.discovery_cache:file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth
jccmga opened this issue · 3 comments
jccmga commented
When upgrading google-api-python-client
and oauth2client
, there is this warning from the GCP cloud:
"WARNING:googleapiclient.discovery_cache:file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth"
It would be great to be able to specify if the build
call in this line should use the cache or no:
Line 141 in ddfe8d2
I was thinking something like this:
class NLAPISegmenter(Segmenter):
...
def __init__(self, cache_filename, credentials_path, use_entity, use_cache, cache_discovery):
...
self._authenticate(cache_discovery)
...
def _authenticate(self, cache_discovery):
...
service = googleapiclient.discovery.build(
'language', 'v1beta2', http=authed_http, cache_discovery=cache_discovery)
tushuhei commented
Hi Juan,
Thank you for flagging this issue! Your suggested change looks good to me. Do you want to make a PR for this change?
juancamilo1 commented
Hi Shuhei,
Sure! Here it is: #96
tushuhei commented
Closing this issue since the PR is merged.