File tree 1 file changed +5
-2
lines changed 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
from datetime import datetime
2
+ import re
2
3
import json
3
4
import logging
4
5
import sys
@@ -25,8 +26,10 @@ def _check_google_client_version():
25
26
raise ImportError ('Could not import pkg_resources (setuptools).' )
26
27
27
28
_GOOGLE_API_CLIENT_VERSION = pkg_resources .get_distribution ('google-api-python-client' ).version
29
+ _GOOGLE_API_CLIENT_VERSION = re .sub (
30
+ r'(\.0+)*$' , '' , _GOOGLE_API_CLIENT_VERSION )
28
31
29
- if LooseVersion (_GOOGLE_API_CLIENT_VERSION ) < '1.2.0 ' :
32
+ if LooseVersion (_GOOGLE_API_CLIENT_VERSION ) < '1.2' :
30
33
raise ImportError ("pandas requires google-api-python-client >= 1.2.0 for Google "
31
34
"BigQuery support, current version " + _GOOGLE_API_CLIENT_VERSION )
32
35
@@ -121,7 +124,7 @@ def get_service(self, credentials):
121
124
122
125
try :
123
126
from apiclient .discovery import build
124
-
127
+
125
128
except ImportError :
126
129
raise ImportError ('Could not import Google API Client.' )
127
130
You can’t perform that action at this time.
0 commit comments