Skip to content

BUG: #10652 google-api-python-client minimum version check #10656

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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/requirements-2.7.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ html5lib=1.0b2
beautiful-soup=4.2.1
httplib2=0.8
python-gflags=2.0
google-api-python-client=1.2
google-api-python-client=1.2.0
7 changes: 5 additions & 2 deletions pandas/io/gbq.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from datetime import datetime
import re
import json
import logging
import sys
Expand All @@ -25,8 +26,10 @@ def _check_google_client_version():
raise ImportError('Could not import pkg_resources (setuptools).')

_GOOGLE_API_CLIENT_VERSION = pkg_resources.get_distribution('google-api-python-client').version
_GOOGLE_API_CLIENT_VERSION = re.sub(
r'(\.0+)*$', '', _GOOGLE_API_CLIENT_VERSION)

if LooseVersion(_GOOGLE_API_CLIENT_VERSION) < '1.2.0':
if LooseVersion(_GOOGLE_API_CLIENT_VERSION) < '1.2':
raise ImportError("pandas requires google-api-python-client >= 1.2.0 for Google "
"BigQuery support, current version " + _GOOGLE_API_CLIENT_VERSION)

Expand Down Expand Up @@ -121,7 +124,7 @@ def get_service(self, credentials):

try:
from apiclient.discovery import build

except ImportError:
raise ImportError('Could not import Google API Client.')

Expand Down