From 702fb931c05f3c45b973827292bdb74a0a6a0c54 Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Tue, 8 Sep 2020 15:39:37 -0600 Subject: [PATCH] Disable cache_discovery --- CHANGELOG.md | 5 +++++ gapc_storage/storage.py | 3 ++- setup.py | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32855a1..b35f060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ## [Unreleased] +## [0.5.3] - 2020-09-08 +- Fix 'ImportError: file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth' +warning by disabling cache_discovery +- Change dependency to google-api-python-client 1.11 + ## [0.5.1] - 2018-07-07 ### Fixed diff --git a/gapc_storage/storage.py b/gapc_storage/storage.py index d678cc1..a790fbf 100644 --- a/gapc_storage/storage.py +++ b/gapc_storage/storage.py @@ -110,7 +110,8 @@ def __init__(self): def build_client(self): credentials = self.get_oauth_credentials() http = credentials.authorize(httplib2.Http()) - return discovery_build("storage", "v1", http=http) + # cache_discovery=False prevents 'ImportError: file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth' + return discovery_build("storage", "v1", http=http, cache_discovery=False) @property def client(self): diff --git a/setup.py b/setup.py index 404b0a3..b678e92 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name="django-gapc-storage", - version="0.5.2-rc1", + version="0.5.3", author="Eldarion, Inc.", author_email="development@eldarion.com", description="a Django storage backend using GCS JSON API", @@ -12,7 +12,7 @@ url="http://github.com/eldarion/django-gapc-storage", packages=find_packages(), install_requires=[ - "google-api-python-client>=1.5.0,<=1.7", + "google-api-python-client>=1.5.0,<=1.11", "oauth2client", "python-dateutil", ],