Skip to content

Commit ccbf1b0

Browse files
fix: change requests lib import place (#1010)
1 parent 6bfd9b5 commit ccbf1b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/google-auth/google/auth/impersonated_credentials.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
from google.auth import credentials
3838
from google.auth import exceptions
3939
from google.auth import jwt
40-
from google.auth.transport.requests import AuthorizedSession
4140

4241
_DEFAULT_TOKEN_LIFETIME_SECS = 3600 # 1 hour in seconds
4342

@@ -276,6 +275,7 @@ def _update_token(self, request):
276275
)
277276

278277
def sign_bytes(self, message):
278+
from google.auth.transport.requests import AuthorizedSession
279279

280280
iam_sign_endpoint = _IAM_SIGN_ENDPOINT.format(self._target_principal)
281281

@@ -407,6 +407,7 @@ def with_quota_project(self, quota_project_id):
407407

408408
@_helpers.copy_docstring(credentials.Credentials)
409409
def refresh(self, request):
410+
from google.auth.transport.requests import AuthorizedSession
410411

411412
iam_sign_endpoint = _IAM_IDTOKEN_ENDPOINT.format(
412413
self._target_credentials.signer_email

0 commit comments

Comments
 (0)