Skip to content
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

fix: Conditionally import requests only if no request was passed by the caller. #1456

Merged
merged 3 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion google/oauth2/id_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
from google.auth import environment_vars
from google.auth import exceptions
from google.auth import jwt
import google.auth.transport.requests


# The URL that provides public certificates for verifying ID tokens issued
Expand Down Expand Up @@ -282,6 +281,8 @@ def fetch_id_token_credentials(audience, request=None):

# Create a request object if not provided.
if not request:
import google.auth.transport.requests

request = google.auth.transport.requests.Request()

if _metadata.ping(request):
Expand Down
Binary file modified system_tests/secrets.tar.enc
Binary file not shown.