Skip to content

Commit

Permalink
Add oauth2client 1.4.1 submodule and six dependency, remove google-ap…
Browse files Browse the repository at this point in the history
…i-python-client
  • Loading branch information
thobrla committed Nov 13, 2014
1 parent 24c1bae commit 07e4f9b
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
9 changes: 6 additions & 3 deletions .gitmodules
Expand Up @@ -4,9 +4,6 @@
[submodule "third_party/httplib2"]
path = third_party/httplib2
url = git://github.com/jcgregorio/httplib2.git
[submodule "third_party/google-api-python-client"]
path = third_party/google-api-python-client
url = git://github.com/gsutil-mirrors/google-api-python-client.git
[submodule "third_party/python-gflags"]
path = third_party/python-gflags
url = git://github.com/gsutil-mirrors/python-gflags.git
Expand All @@ -25,3 +22,9 @@
[submodule "third_party/gcs-oauth2-boto-plugin"]
path = third_party/gcs-oauth2-boto-plugin
url = https://github.com/GoogleCloudPlatform/gcs-oauth2-boto-plugin.git
[submodule "third_party/oauth2client"]
path = third_party/oauth2client
url = https://github.com/google/oauth2client.git
[submodule "third_party/six"]
path = third_party/six
url = https://github.com/gsutil-mirrors/six.git
6 changes: 3 additions & 3 deletions gslib/__main__.py
Expand Up @@ -301,9 +301,9 @@ def main():
_ConfigureLogging(level=logging.WARNING)
else:
_ConfigureLogging(level=logging.INFO)
# apiclient and oauth2client use info logging in places that would better
# correspond to gsutil's debug logging (e.g., when refreshing access
# tokens).
# oauth2client uses info logging in places that would better
# correspond to gsutil's debug logging (e.g., when refreshing
# access tokens).
oauth2client.client.logger.setLevel(logging.WARNING)

if not CERTIFICATE_VALIDATION_ENABLED:
Expand Down
12 changes: 3 additions & 9 deletions gslib/commands/perfdiag.py
Expand Up @@ -35,7 +35,6 @@
import tempfile
import time

from apiclient import errors as apiclient_errors
import boto
import boto.gs.connection

Expand Down Expand Up @@ -456,14 +455,9 @@ def _RunOperation(self, func):
if total_retried > self.MAX_TOTAL_RETRIES:
self.logger.info('Reached maximum total retries. Not retrying.')
break
if (isinstance(e, apiclient_errors.HttpError) or
isinstance(e, ServiceException)):
if isinstance(e, apiclient_errors.HttpError):
status = e.resp.status
else:
status = e.status
if status >= 500:
self.error_responses_by_code[status] += 1
if isinstance(e, ServiceException):
if e.status >= 500:
self.error_responses_by_code[e.status] += 1
self.total_requests += 1
self.request_errors += 1
server_error_retried += 1
Expand Down
3 changes: 2 additions & 1 deletion gsutil.py
Expand Up @@ -58,12 +58,13 @@ def OutputAndExit(message):
# the directory under third_party and the second element is the subdirectory
# that needs to be added to sys.path.
THIRD_PARTY_LIBS = [
('google-api-python-client', ''), # Must be before boto.
('oauth2client', ''), # Must be before boto.
('boto', ''),
('gcs-oauth2-boto-plugin', ''),
('httplib2', 'python2'),
('python-gflags', ''),
('retry-decorator', ''),
('six', ''),
('socksipy-branch', ''),
]
for libdir, subdir in THIRD_PARTY_LIBS:
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -38,11 +38,12 @@
'boto==2.30.0',
'crcmod>=1.7',
'gcs-oauth2-boto-plugin>=1.8',
'google-api-python-client>=1.1',
'httplib2>=0.8',
'oauth2client>=1.4.1',
'pyOpenSSL>=0.13',
'python-gflags>=2.0',
'retry_decorator>=1.0.0',
'six>=1.8.0',
# Not using 1.02 because of:
# https://code.google.com/p/socksipy-branch/issues/detail?id=3
'SocksiPy-branch==1.01',
Expand Down
1 change: 0 additions & 1 deletion third_party/google-api-python-client
Submodule google-api-python-client deleted from 06134f
1 change: 1 addition & 0 deletions third_party/oauth2client
Submodule oauth2client added at 00c4c8
1 change: 1 addition & 0 deletions third_party/six
Submodule six added at a1a1b8

0 comments on commit 07e4f9b

Please sign in to comment.