remove dead code: try/import/except for async rest dependencies #15548
Copy link
Copy link
Open
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: cleanupAn internal cleanup or hygiene concern.An internal cleanup or hygiene concern.
Milestone
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: cleanupAn internal cleanup or hygiene concern.An internal cleanup or hygiene concern.
Activity
daniel-sanche commentedon Feb 9, 2026
I think keeping
aiohttpas an optional dependency makes sense, because google-auth'sAsyncAuthorizedSessionwill raise an exception on use if it's not providedBut 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)