Skip to content

remove dead code: try/import/except for async rest dependencies #15548

Description

@vchudnov-g

async_rest has been an optional dependency., leading to installation of google-auth[aiohttp] >= 2.35.0. WBut now we unconditionally required google_-auth >= 2.35.0. We should determine whether we can get rid of the extra, and whether we can get rid of the tr/import/except pattern in multiple places that tests for the async REST dependencies.

This is motivated by a PR conversation.

Activity

  1. added
    type: cleanupAn internal cleanup or hygiene concern.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Feb 9, 2026
  2. daniel-sanche commented on Feb 9, 2026

    @daniel-sanche
    Contributor

    I think keeping aiohttp as an optional dependency makes sense, because google-auth's AsyncAuthorizedSession will raise an exception on use if it's not provided

    But the try/except blocks should be removed if we pin to v2.35, because they will never hit that ImportError

    (The missing aiohttp error is raised when AsyncAuthorizedSession is called, not at ImportTime)

  3. added this to the Async REST GA milestone on Oct 2, 2026
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