Skip to content

Conversation

CoteTommy
Copy link

@CoteTommy CoteTommy commented May 27, 2025

Removes dependency on google.auth.credentials.TokenState, which was introduced in google-auth v2.26.0.
To maintain compatibility with earlier versions, replaces TokenState.FRESH with its equivalent hardcoded value 1.

Reference: https://github.com/googleapis/google-auth-library-python/blob/7c61c7d0a42ceec3eab693065745a74f524acab0/google/auth/credentials.py#L520

Fixes:
Could not load Google Cloud Storage bindings error when using google-auth < 2.26.0 with django-storages >= 1.14.6.

I give @martey all the credit for the solution (issue 1449)

@CoteTommy CoteTommy changed the title fix(gcloud): remove TokenState import for backward compatibility Remove TokenState import for backward compatibility May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant