ImportError in google.oauth2.id_token #1455
Labels
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Environment details
google-auth
version: 2.26.2Steps to reproduce
google-auth
google.oauth2.id_token
moduleHi folks,
it looks like
google.oauth2.id_token
has an import time dependency ofgoogle.auth.transport.requests
https://github.com/googleapis/google-auth-library-python/blob/main/google/oauth2/id_token.py#L65
which requires a
requests
packagehttps://github.com/googleapis/google-auth-library-python/blob/main/google/auth/transport/requests.py#L25
that's not defined as a
google-auth
dependency.https://github.com/googleapis/google-auth-library-python/blob/main/setup.py#L22
The call to
google.auth.transport.requests
is only made once in https://github.com/googleapis/google-auth-library-python/blob/main/google/oauth2/id_token.py#L285 so the possible solution will be to move the import to runtime.The text was updated successfully, but these errors were encountered: