fix!: drop support for Python 2.7 (#778)
Drop use of 'six' wrapper library.
Drop 'u"' prefixes.
Drop support for app_engine 'classic' mode (Python 2.7-only).
Release-As: 2.0.0b1
Closes #777.
diff --git a/google/auth/impersonated_credentials.py b/google/auth/impersonated_credentials.py
index b8a6c49..2704bfd 100644
--- a/google/auth/impersonated_credentials.py
+++ b/google/auth/impersonated_credentials.py
@@ -28,11 +28,9 @@
import base64
import copy
from datetime import datetime
+import http.client
import json
-import six
-from six.moves import http_client
-
from google.auth import _helpers
from google.auth import credentials
from google.auth import exceptions
@@ -100,7 +98,7 @@
else response.data
)
- if response.status != http_client.OK:
+ if response.status != http.client.OK:
exceptions.RefreshError(_REFRESH_ERROR, response_body)
try:
@@ -117,7 +115,7 @@
),
response_body,
)
- six.raise_from(new_exc, caught_exc)
+ raise new_exc from caught_exc
class Credentials(credentials.CredentialsWithQuotaProject, credentials.Signing):