Conversation
|
@jonparrott As discussed in chat, move to |
google/auth/transport/_httplib2.py
Outdated
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| """Transport adapter for urllib3.""" |
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.
|
|
||
| _LOGGER = logging.getLogger(__name__) | ||
| # Properties present in file-like streams / buffers. | ||
| _STREAM_PROPERTIES = ('read', 'seek', 'tell') |
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.
| self._data = data | ||
|
|
||
| @property | ||
| def status(self): |
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.
google/auth/transport/_httplib2.py
Outdated
|
|
||
| @property | ||
| def headers(self): | ||
| return self._response |
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.
google/auth/transport/_httplib2.py
Outdated
| response from the server. This is ignored by httplib2 and will | ||
| issue a warning. | ||
| kwargs: Additional arguments passed throught to the underlying | ||
| httplib2 :meth:`request` method. |
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.
| if timeout is not None: | ||
| _LOGGER.warning( | ||
| 'httplib2 transport does not support per-request timeout. ' | ||
| 'Set the timeout when constructing the httplib2.Http instance.' |
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.
| raise exceptions.TransportError(exc) | ||
|
|
||
|
|
||
| def _make_default_http(): |
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.
google/auth/transport/_httplib2.py
Outdated
| 'https://www.googleapis.com/storage/v1/b') | ||
|
|
||
| This class implements :meth:`request` in the same way as | ||
| :class:`httplib2.Http` and can be usually be used just like any other |
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.
google/auth/transport/_httplib2.py
Outdated
| http (httplib2.Http): The underlying HTTP object to | ||
| use to make requests. If not specified, a | ||
| :class:`httplib2.Http` instance will be constructed with | ||
| sane defaults. |
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.
google/auth/transport/_httplib2.py
Outdated
| The underlying :meth:`request` implementation handles adding the | ||
| credentials' headers to the request and refreshing credentials as needed. | ||
|
|
||
| Args: |
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.
google/auth/transport/_httplib2.py
Outdated
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| """Transport adapter for urllib3.""" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| _LOGGER = logging.getLogger(__name__) | ||
| # Properties present in file-like streams / buffers. | ||
| _STREAM_PROPERTIES = ('read', 'seek', 'tell') |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| self._data = data | ||
|
|
||
| @property | ||
| def status(self): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
google/auth/transport/_httplib2.py
Outdated
|
|
||
| @property | ||
| def headers(self): | ||
| return self._response |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
google/auth/transport/_httplib2.py
Outdated
| response from the server. This is ignored by httplib2 and will | ||
| issue a warning. | ||
| kwargs: Additional arguments passed throught to the underlying | ||
| httplib2 :meth:`request` method. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| if timeout is not None: | ||
| _LOGGER.warning( | ||
| 'httplib2 transport does not support per-request timeout. ' | ||
| 'Set the timeout when constructing the httplib2.Http instance.' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| raise exceptions.TransportError(exc) | ||
|
|
||
|
|
||
| def _make_default_http(): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
google/auth/transport/_httplib2.py
Outdated
| 'https://www.googleapis.com/storage/v1/b') | ||
|
|
||
| This class implements :meth:`request` in the same way as | ||
| :class:`httplib2.Http` and can be usually be used just like any other |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
google/auth/transport/_httplib2.py
Outdated
| http (httplib2.Http): The underlying HTTP object to | ||
| use to make requests. If not specified, a | ||
| :class:`httplib2.Http` instance will be constructed with | ||
| sane defaults. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
google/auth/transport/_httplib2.py
Outdated
| The underlying :meth:`request` implementation handles adding the | ||
| credentials' headers to the request and refreshing credentials as needed. | ||
|
|
||
| Args: |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
b22e0f6 to
58eeed7
Compare
58eeed7 to
430ba9e
Compare
httplib2_transport/.coveragerc
Outdated
|
|
||
| [report] | ||
| omit = | ||
| */samples/* |
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.
httplib2_transport/README.rst
Outdated
|
|
||
| .. note:: Httplib2 has lots of problems. Using it is highly discouraged. This | ||
| library is intended to help existing users of oauth2client migrate to | ||
| google-auth. |
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.
httplib2_transport/README.rst
Outdated
| library is intended to help existing users of oauth2client migrate to | ||
| google-auth. | ||
|
|
||
| .. |pypi| image:: https://img.shields.io/pypi/v//google-auth.svg |
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,165 @@ | |||
| [MASTER] | |||
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,57 @@ | |||
| # Copyright 2014 Google Inc. | |||
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.
httplib2_transport/setup.py
Outdated
| description='Google Authentication Library', | ||
| long_description=long_description, | ||
| url='https://github.com/GoogleCloudPlatform/google-auth-library-python', | ||
| modules=['google_auth_httplib2'], |
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.
| 'pyasn1-modules>=0.0.5', | ||
| 'rsa>=3.1.4', | ||
| 'six>=1.9.0', | ||
| ) |
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,92 @@ | |||
| # Copyright 2016 Google Inc. | |||
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.
| --import-order-style=google \ | ||
| --application-import-names="google_auth_httplib2,tests" \ | ||
| google_auth_httplib2.py tests | ||
| pylint --rcfile pylintrc google_auth_httplib2.py |
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.
| pytest-cov | ||
| pytest-localserver | ||
| httplib2 | ||
| {toxinidir}/.. |
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.
I weep, but this will help
google-cloud-pythonandgoogle-api-python-clientas well as first-party users in google3 migrate off oauth2client without having to change transports.