shunping opened a new pull request, #40623:
URL: https://github.com/apache/beam/pull/40623
Two tests in `apache_beam/dataframe/io_test.py` started failing in the
non-GCP `py3xx` tox environments:
- `ReadGbqTransformTests.test_bad_schema_public_api_direct_read`:
`ValueError: Please install GCP Dependencies.`
- `ReadGbqTransformTests.test_unsupported_callable`: the expected "got a
callable instead" error never appeared. Instead it raised
`TypeError: isinstance() arg 2 must be a type, a tuple of types, or a
union`.
**Root cause**
- `ReadGbqTransformTests` was skipped only when `google.api_core` could not
be imported. The tests actually need the apitools-based BigQuery client
(`apache_beam.io.gcp.internal.clients.bigquery`).
- `cloud-sql-python-connector` 1.23.0, released 2026-10-15 and pulled in by
the `test` extra, adds a new dependency on `google-cloud-sql`, which needs
`google-api-core`. So `google.api_core` is now installed in the non-GCP envs,
but `google-apitools` is not.
As a result:
- the test class is no longer skipped
- the BigQuery client module imports but is empty, because its `__init__.py`
swallows the `ImportError`. So `bigquery.TableFieldSchema` doesn't exist.
- `bigquery_tools.TableReference` falls back to `None`, so
`parse_table_reference` ends up calling `isinstance(table, None)`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]