Skip to content

feat: add pandas-gbq to optional extras - #18020

Open
shuoweil wants to merge 2 commits into
mainfrom
shuowei-storage-add-pandas-gbq-extra
Open

feat: add pandas-gbq to optional extras#18020
shuoweil wants to merge 2 commits into
mainfrom
shuowei-storage-add-pandas-gbq-extra

Conversation

@shuoweil

@shuoweil shuoweil commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Adds pandas-gbq>=0.35.1 and pyarrow>=3.0.0 to the pandas optional extra in google-cloud-bigquery-storage, while keeping pyarrow extra lightweight without pandas dependencies.

Details

  • Updates extras["pandas"] in setup.py to include pyarrow>=3.0.0 and pandas-gbq>=0.35.1.
  • Keeps extras["pyarrow"] as pyarrow>=3.0.0 only so pure Arrow/Polars/DuckDB workflows avoid pulling in pandas and numpy.

Fixes #<526614511> 🦕

@shuoweil
shuoweil requested review from a team as code owners August 6, 2026 21:19
@shuoweil
shuoweil requested review from sycai and removed request for a team August 6, 2026 21:19

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

Copy link
Copy Markdown
Contributor

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 updates the setup.py file for google-cloud-bigquery-storage to add pandas-gbq and pyarrow to the pandas extra, and pandas-gbq to the pyarrow extra. The reviewer points out that adding pandas-gbq is unnecessary and introduces a circular dependency loop, as pandas-gbq depends on google-cloud-bigquery, which depends on google-cloud-bigquery-storage.

Comment on lines +57 to +66
"pandas": [
"pandas>=1.1.3",
"pyarrow>=3.0.0",
"pandas-gbq>=0.35.1",
],
"fastavro": ["fastavro>=1.1.0"],
"pyarrow": ["pyarrow>=3.0.0"],
"pyarrow": [
"pyarrow>=3.0.0",
"pandas-gbq>=0.35.1",
],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Adding pandas-gbq as an optional extra dependency for pandas and pyarrow in google-cloud-bigquery-storage is unnecessary and introduces a circular dependency chain.

  1. No Direct Usage: google-cloud-bigquery-storage does not import or use pandas-gbq directly. It only requires pandas and pyarrow (or fastavro) to serialize/deserialize data streams.
  2. Circular Dependency: pandas-gbq depends on google-cloud-bigquery, which in turn depends on google-cloud-bigquery-storage. Adding pandas-gbq here creates a circular dependency loop that can cause issues during dependency resolution with package managers like pip or poetry.
    "pandas": [
        "pandas>=1.1.3",
        "pyarrow>=3.0.0",
    ],
    "fastavro": ["fastavro>=1.1.0"],
    "pyarrow": [
        "pyarrow>=3.0.0",
    ],

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