Skip to content

Fix/invalid union return type#4

Merged
mattcoulter7 merged 2 commits intomainfrom
fix/invalid-union-return-type
Feb 6, 2026
Merged

Fix/invalid union return type#4
mattcoulter7 merged 2 commits intomainfrom
fix/invalid-union-return-type

Conversation

@mattcoulter7
Copy link
Member

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:

  • Changed get_access_token and set_access_token methods in the AsyncClient template to be asynchronous (async def), allowing for potential async token retrieval logic. [1] [2]
  • Updated the usage of get_access_token in the HTTP Authorization header to correctly await the asynchronous method.

Versioning:

  • Bumped the package version from 2.2.4 to 2.2.5 in pyproject.toml.

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.
@mattcoulter7 mattcoulter7 merged commit e90698e into main Feb 6, 2026
0 of 2 checks passed
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