diff options
Diffstat (limited to 'google/auth/transport/__init__.py')
-rw-r--r-- | google/auth/transport/__init__.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/google/auth/transport/__init__.py b/google/auth/transport/__init__.py index d1b035d..374e7b4 100644 --- a/google/auth/transport/__init__.py +++ b/google/auth/transport/__init__.py @@ -25,9 +25,11 @@ for the return value of :class:`Request`. """ import abc -import http.client -DEFAULT_REFRESH_STATUS_CODES = (http.client.UNAUTHORIZED,) +import six +from six.moves import http_client + +DEFAULT_REFRESH_STATUS_CODES = (http_client.UNAUTHORIZED,) """Sequence[int]: Which HTTP status code indicate that credentials should be refreshed and a request should be retried. """ @@ -36,7 +38,8 @@ DEFAULT_MAX_REFRESH_ATTEMPTS = 2 """int: How many times to refresh the credentials and retry a request.""" -class Response(object, metaclass=abc.ABCMeta): +@six.add_metaclass(abc.ABCMeta) +class Response(object): """HTTP Response data.""" @abc.abstractproperty @@ -55,7 +58,8 @@ class Response(object, metaclass=abc.ABCMeta): raise NotImplementedError("data must be implemented.") -class Request(object, metaclass=abc.ABCMeta): +@six.add_metaclass(abc.ABCMeta) +class Request(object): """Interface for a callable that makes HTTP requests. Specific transport implementations should provide an implementation of |