feat: add httpx transport and async compute engine credentials #1908
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NOTE: closing this temporarily to support the migration to the python mono-repo. Once this repo is safely merged, this should be revisited.
Add httpx transport and async compute engine credentials.
This PR builds on the concepts, ideas, and code found in PR googleapis/google-auth-library-python#1255. There were some fundamental issues with the previous PR and we attempt to address those issues here. See this comment from the other PR:
httpx(_metadata_async.pyimports explicitly fromgoogle.auth.transport._httpx_requests). This breaks the transport agnostic design of the library. If a user wanted to useaiohttpwith async compute engine credentials, they would be unable to do so easily with this design._metadata_async.pyimplements a reasonable Request protocol that should accept any valid async request callable (such asaiohttp), not justhttpx.datetime.datetime.utcnow()which has been deprecated (in Python 3.12) and replace them withgoogle.auth._helpers.utcnow().Supports closure of Issue googleapis/google-cloud-python#15134
PR created automatically by Jules for task 5612836208709637744 started by @chalmerlowe