feat: add pandas-gbq to optional extras - #18020
Open
shuoweil wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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", | ||
| ], |
Contributor
There was a problem hiding this comment.
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.
- No Direct Usage:
google-cloud-bigquery-storagedoes not import or usepandas-gbqdirectly. It only requirespandasandpyarrow(orfastavro) to serialize/deserialize data streams. - Circular Dependency:
pandas-gbqdepends ongoogle-cloud-bigquery, which in turn depends ongoogle-cloud-bigquery-storage. Addingpandas-gbqhere creates a circular dependency loop that can cause issues during dependency resolution with package managers likepiporpoetry.
"pandas": [
"pandas>=1.1.3",
"pyarrow>=3.0.0",
],
"fastavro": ["fastavro>=1.1.0"],
"pyarrow": [
"pyarrow>=3.0.0",
],
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
pandas-gbq>=0.35.1andpyarrow>=3.0.0to thepandasoptional extra ingoogle-cloud-bigquery-storage, while keepingpyarrowextra lightweight without pandas dependencies.Details
extras["pandas"]in setup.py to includepyarrow>=3.0.0andpandas-gbq>=0.35.1.extras["pyarrow"]aspyarrow>=3.0.0only so pure Arrow/Polars/DuckDB workflows avoid pulling inpandasandnumpy.Fixes #<526614511> 🦕