Skip to content

Update type hints for credentials in the async client layer #16268

Description

@ohmayr

Update the credentials type hint in the async client constructor to include asynchronous credentials i.e. async credentials should also support google.auth.aio.credentials.Credentials which are required by the async rest transport.

For now, the type hint isn't updated in the client layer and mypy warnings are silenced by adding # type: ignore in the async rest transport constructor. This can be looked up by searching for this issue.

Related issue: #16269

Activity

  1. added
    type: cleanupAn internal cleanup or hygiene concern.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Sep 20, 2024
  2. parthea commented on Mar 26, 2026

    @parthea
    Contributor

    Transferring to google-cloud-python as the code for gapic-generator will be migrated there.

  3. added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Mar 26, 2026
  4. daniel-sanche commented on Oct 2, 2026

    @daniel-sanche
    Contributor

    The async client will support sync credentials when using versions of auth that include #18542

    We still need to update the types

  5. added this to the Async REST GA milestone on Oct 2, 2026
  6. daniel-sanche commented on Oct 5, 2026

    @daniel-sanche
    Contributor

    Actually, I think we can close this out as complete, now that sync credentials are supported

    async_rest supports either option. async_grpc only supports sync credentials. The common denominator is that sync credentials work everywhere, so we can keep that as the type hint

    We can revisit this in the future, if we support async credentials for the grpc client, or have a reason to expose async credential support for just the http client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: cleanupAn internal cleanup or hygiene concern.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions