-
Notifications
You must be signed in to change notification settings - Fork 311
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
Add transport #2
Conversation
Also by happy accident I forgot to implement |
@dhermes I know I promised to unplug, but I had a hunch about the tests. It seems like a good indication that this allows me to reduce the usage of |
@@ -112,7 +112,9 @@ def _get_gae_credentials(): | |||
|
|||
|
|||
def _get_gce_credentials(): | |||
if _metadata.ping(): | |||
# TODO: Ping now requires a request argument. Figure out how to deal with |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -20,6 +20,11 @@ class GoogleAuthError(Exception): | |||
pass | |||
|
|||
|
|||
class TransportError(Exception): | |||
"""Used to indicate an error occurred during an HTTP request.""" | |||
pass |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -0,0 +1,82 @@ | |||
# Copyright 2016 Google Inc. All rights reserved. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
""" | ||
# pylint: disable=redundant-returns-doc, missing-raises-doc | ||
# (pylint doesn't play well with abstract docstrings.) | ||
raise NotImplementedError('__call__ must be implemented.') |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
def __call__(self, url, method='GET', body=None, headers=None, | ||
timeout=None, **kwargs): | ||
""" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
…on types (service accounts, default... etc) (#573) * feat: asyncio http request logic and asynchronous credentials log c * feat: all asynchronous credentials types implemented and with tests * feat: added the private scope for Response class * feat: added docstring for Auth Session request method * fix: Changed initialization of client session to within an async context manager * changed aiohttp_requests abbreviation for the async authorized session class * fix: changed abbrevation of the aiohttp_requests file * fix: comments on PR regarding shared data between requests and aiohttp_requests * fix: fixed noxfile test dependency sharing * fix: fixed the noxfile dependencies between sync and async unit tests * fix: cover async dependency * fix: merge conflict issue with credentials * fix: merge conflict #2 * fix: changed duplicated constants for sync-->async inheritance relationship * fix: async docstring * refactoring * fix: refactoring * fix: first round of comments, refactoring and test duplication changes * fix: removed duplication in _default_async * fix: removed oauth2 client
…ken credentials (#574) * feat: asyncio http request logic and asynchronous credentials log c * feat: all asynchronous credentials types implemented and with tests * included system tests for the asynchronous auth library * feat: added the private scope for Response class * feat: added docstring for Auth Session request method * fix: Changed initialization of client session to within an async context manager * changed aiohttp_requests abbreviation for the async authorized session class * fix: changed abbrevation of the aiohttp_requests file * fix: comments on PR regarding shared data between requests and aiohttp_requests * fix: fixed noxfile test dependency sharing * fix: fixed the noxfile dependencies between sync and async unit tests * fix: cover async dependency * fix: merge conflict issue with credentials * fix: merge conflict #2 * fix: changed duplicated constants for sync-->async inheritance relationship * fix: async docstring * refactoring * fix: refactoring * fix: first round of comments, refactoring and test duplication changes * fix: removed duplication in _default_async * compute engine and metadata changes * fix: removed oauth2 client * added further system tests and refactored * modified aiohttp request docstring * refactoring and fixing comments * refactored system tests and re-wrote nox file * metadata typo * fix: nox file tests added * fix: directory path in app_engine
Proof-of-concept for #1.
(Not fully implemented, tests will not pass).
I validated this with: