-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Discovery caching with file_cache is unsupported #2272
Comments
In version 2.x of this library, a new feature was added to build clients using a cached copy of discovery artifacts. The new feature is captured in the README (link below)
See the Migration Guide below which includes code samples This solution should work as long as the service and API version appear in the static discovery document directory here: https://github.com/googleapis/google-api-python-client/tree/main/googleapiclient/discovery_cache/documents Please can you clarify if you require any discovery documents which are not in that directory? |
I think @peterkappelt was talking about One way to solve this issue on your own is to add a custom implementation of Cache and use it as the |
Hey everyone, this is a follow-up related to #1490 and #299.
If I understand correctly,
discovery_cache.file_cache
is broken (since it relies onoauth2client<4.0.0
which is deprecated) and there is no way of using the discovery cache currently (outside of app engine environments), right?This is far from optimal, especially for a current project of mine, where API client objects are built frequently with different credentials - and I'd definitely prefer to avoid unnecessary discovery requests.
Do you have a plan/ strategy for supporting
file_cache
again in the future? If not, I'd suggest simply copying theoauth2client.contrib.locked_file
module over to this repository. It is self-contained and thus should be fairly easy to maintain. Would that be a workaround you'd consider acceptable?Cheers, Peter
The text was updated successfully, but these errors were encountered: