Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Remove httplib2 imports from non-transport modules. #577

Merged
merged 1 commit into from
Aug 1, 2016

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Jul 29, 2016

Now all usage of httplib2 is concentrated in tests and in the oauth2client.transport module. This does not yet cover all behavior that implicitly relies on httplib2 in these modules, so there is still work to be done.


$ git grep import | grep httplib2
oauth2client/transport.py:import httplib2
samples/oauth2_for_devices.py:import httplib2
scripts/run_gce_system_tests.py:import httplib2
scripts/run_system_tests.py:import httplib2
tests/contrib/test_appengine.py:import httplib2
tests/contrib/test_flask_util.py:import httplib2
tests/contrib/test_gce.py:import httplib2
tests/contrib/test_metadata.py:import httplib2
tests/http_mock.py:import httplib2
tests/test_client.py:import httplib2
tests/test_service_account.py:import httplib2
tests/test_transport.py:import httplib2

@@ -134,8 +133,8 @@ def _refresh(self, http_request):
self._retrieve_info(http_request)
self.access_token, self.token_expiry = _metadata.get_token(
http_request, service_account=self.service_account_email)
except httplib2.HttpLib2Error as e:
raise client.HttpAccessTokenRefreshError(str(e))
except transport.transport_error() as err:

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor Author

dhermes commented Aug 1, 2016

@jonparrott PTAL

@dhermes
Copy link
Contributor Author

dhermes commented Aug 1, 2016

Also LMK if you want the two commits squashed into one before merging

@theacodes
Copy link
Contributor

LGTM, and please squash and change the voice to active. Remove httplib2 imports ...

@dhermes dhermes changed the title Removing httplib2 imports from non-transport modules. Remove httplib2 imports from non-transport modules. Aug 1, 2016
Now all usage of httplib2 is concentrated in tests and
in the oauth2client.transport module. This does not yet
cover all behavior that implicitly relies on httplib2
in these modules, so there is still work to be done.
@dhermes dhermes merged commit cd825cc into googleapis:master Aug 1, 2016
@dhermes dhermes deleted the towards-554-part3 branch August 1, 2016 22:13
@dhermes dhermes mentioned this pull request Aug 1, 2016
7 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants