Skip to content

fix: remove usage of typing_extensions where possible#17358

Draft
parthea wants to merge 4 commits into
mainfrom
remove-typing-extensions
Draft

fix: remove usage of typing_extensions where possible#17358
parthea wants to merge 4 commits into
mainfrom
remove-typing-extensions

Conversation

@parthea
Copy link
Copy Markdown
Contributor

@parthea parthea commented Jun 3, 2026

Fixes #17244

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request attempts to simplify type hinting imports by replacing conditional imports from typing_extensions with direct imports from typing and types (such as TypeGuard, Self, ParamSpec, TypeAlias, Concatenate, and UnionType). However, because several of the modified packages still support Python 3.8 or 3.9, these direct imports will cause runtime ImportErrors or type-checking failures on older Python versions. The feedback recommends restoring the conditional imports based on sys.version_info to preserve backward compatibility.

Comment thread packages/bigframes/bigframes/core/utils.py
Comment thread packages/bigframes/bigframes/series.py
Comment thread packages/bigframes/bigframes/series.py
Comment thread packages/google-api-core/google/api_core/retry/retry_unary.py
Comment thread packages/google-api-core/google/api_core/retry/retry_unary_async.py
@parthea parthea force-pushed the remove-typing-extensions branch from 59b8df4 to b4733cc Compare June 3, 2026 15:57
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.

Remove usage of typing_extensions in google-cloud-python

1 participant