Skip to content

Commit

Permalink
Merge pull request #23 from coloradocarlos/fix_file_cache_warning
Browse files Browse the repository at this point in the history
Disable googleapiclient cache_discovery
  • Loading branch information
jacobwegner authored Sep 9, 2020
2 parents e6a72d6 + 702fb93 commit 8132a10
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion gapc_storage/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
],
Expand Down

0 comments on commit 8132a10

Please sign in to comment.