Merged
Conversation
Update the async httpx + pydantic v2 client template to use async accessors for the access token. get_access_token and set_access_token are converted to async defs, and callers are updated to await the token (e.g. the Authorization header now uses await self.get_access_token()). Existing behavior around env-var-backed tokens (raising on set) is preserved.
Update project version in pyproject.toml from 2.2.4 to 2.2.5 to prepare for the next release.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request updates the async client template to improve async compatibility for access token handling and bumps the package version. The main changes ensure that access token retrieval and setting methods are asynchronous and that token usage in headers is properly awaited.
Async client improvements:
get_access_tokenandset_access_tokenmethods in theAsyncClienttemplate to be asynchronous (async def), allowing for potential async token retrieval logic. [1] [2]get_access_tokenin the HTTPAuthorizationheader to correctlyawaitthe asynchronous method.Versioning:
2.2.4to2.2.5inpyproject.toml.