Skip to content

fix(ci): fix docfx and db-dtypes pandas compat - #18512

Merged
chalmerlowe merged 16 commits into
mainfrom
fix/ci-db-dtypes-docfx-compat
Oct 1, 2026
Merged

chalmerlowe merged 16 commits into
mainfrom
fix/ci-db-dtypes-docfx-compat

Conversation

@chalmerlowe

@chalmerlowe chalmerlowe commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes pre-existing environment and upstream dependency compatibility issues in presubmit testing:

  1. packages/gcp-sphinx-docfx-yaml:

    • Configures venv_backend="virtualenv" on the unit session in noxfile.py so that Nox uses virtualenv/pip when building legacy transitive source distributions (unify/untokenize), preventing build failures under the monorepo's default uv runner.
  2. packages/db-dtypes:

    • Accommodates the updated TypeError message ("'any' with datetime64 dtypes is not supported") raised by newer versions of pandas when testing unsupported datetime64 operations in test_any and test_all.

@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 test_dtypes.py to catch additional TypeError messages containing "not supported" in exercise_any and exercise_all, and configures the unit test session in noxfile.py to use the virtualenv backend to prevent build isolation failures. The feedback suggests using a more specific substring, such as "is not supported", to avoid accidentally catching unrelated TypeError exceptions.

Comment thread packages/db-dtypes/tests/unit/test_dtypes.py Outdated
Comment thread packages/db-dtypes/tests/unit/test_dtypes.py Outdated
@chalmerlowe chalmerlowe changed the title fix(ci): support modern uv backend in docfx and latest pandas in db-dtypes fix(ci): fix docfx and sqlalchemy-bigquery venv backend, and db-dtypes pandas compat Sep 30, 2026
Comment thread packages/sqlalchemy-bigquery/noxfile.py Outdated
@chalmerlowe
chalmerlowe marked this pull request as ready for review September 30, 2026 18:14
@chalmerlowe
chalmerlowe requested review from a team as code owners September 30, 2026 18:14
@chalmerlowe
chalmerlowe requested review from tswast and removed request for a team September 30, 2026 18:14
@chalmerlowe chalmerlowe self-assigned this Sep 30, 2026
@chalmerlowe chalmerlowe added the automerge Merge the pull request once unit tests and other checks pass. label Sep 30, 2026
@chalmerlowe
chalmerlowe marked this pull request as draft September 30, 2026 19:43
@chalmerlowe
chalmerlowe force-pushed the fix/ci-db-dtypes-docfx-compat branch from 22afbe2 to 4f883c4 Compare September 30, 2026 20:00
@chalmerlowe
chalmerlowe marked this pull request as ready for review September 30, 2026 20:01
@chalmerlowe
chalmerlowe force-pushed the fix/ci-db-dtypes-docfx-compat branch from 4f883c4 to d6a14ea Compare September 30, 2026 23:23
…o shard tests

Explicitly set venv_backend="virtualenv" on sqlalchemy-bigquery Nox
sessions to bypass strict PEP 621 duplicate extra name parsing in uv
under UV_PRERELEASE=allow (caused by sqlalchemy==2.1.0rc2).

Removes sqlalchemy-bigquery from EXCLUDED_PACKAGES in ci/get_package_shards.py.
…ositives

Address bot review feedback by narrowing the TypeError substring check
from "not supported" to "is not supported" in exercise_any and exercise_all.
This prevents accidentally suppressing unrelated TypeErrors (e.g. comparison
or argument errors) while still matching the pandas datetime64 message
("'any'/'all' with datetime64 dtypes is not supported").
…ocument versions

Anchors the modern pandas TypeError check in exercise_any and exercise_all
to require 'datetime64' alongside 'is not supported'. This completely eliminates
the risk of matching unrelated TypeErrors (like comparison or argument errors).
Adds self-documenting comments detailing the expected messages across pandas
versions (<3.0 vs >=3.0) and local test mocks.
…ning diversion from uv

Defines VENV_BACKEND = "virtualenv" in noxfile.py with explanatory comments
highlighting the upstream packaging issue in sqlalchemy==2.1.0rc2 (duplicate
normalized extra name 'mssql-pymssql' under strict uv PEP 621 parsing with
UV_PRERELEASE=allow). Applies VENV_BACKEND across affected sessions.
…ERSION

Replace SYSTEM_TEST_PYTHON_VERSIONS[-1] with DEFAULT_PYTHON_VERSION in the
compliance session. When preview/RC Python runtimes (e.g. 3.15) are added
to UNIT_TEST_PYTHON_VERSIONS and ALL_PYTHON before being installed in CI
Docker images, taking the tail index causes Nox to abort with missing
interpreter errors. DEFAULT_PYTHON_VERSION guarantees execution against
the repository-wide verified stable runtime.
BigQuery requires all view definitions to qualify source tables with a
dataset. TableViaSelectTest attempts to create views without dataset
qualification, causing BigQuery to reject the DDL with a 400 DatabaseError.
Exclude TableViaSelectTest from the compliance test suite.
In SQLAlchemy 2.0+, Double and Float bindparams emit parameter types
such as '%(param:DOUBLE)s'. BigQuery does not recognize DOUBLE as a
valid scalar type in DB-API parameter parsing, expecting FLOAT64 instead.
Map visit_DOUBLE and visit_DOUBLE_PRECISION to visit_FLOAT in
BigQueryTypeCompiler to compile to FLOAT64.
…n docs

When docs.python.org is experiencing service degradation (e.g. 503 Service
Unavailable), sphinx-build -W treats the unreachable objects.inv inventory
as a fatal error. Conditionally attach the python mapping only when the
inventory endpoint is reachable to prevent CI doc build failures.
…nventory in docs

When docs.python.org is experiencing service degradation (e.g. 503 Service
Unavailable), sphinx-build -W treats the unreachable objects.inv inventory
as a fatal error. Conditionally attach the python mapping only when the
inventory endpoint is reachable to prevent CI doc build failures.
@chalmerlowe
chalmerlowe force-pushed the fix/ci-db-dtypes-docfx-compat branch from 4f70df9 to 441b68b Compare October 1, 2026 10:05
@chalmerlowe chalmerlowe changed the title fix(ci): fix docfx and sqlalchemy-bigquery venv backend, and db-dtypes pandas compat fix(ci): fix docfx and db-dtypes pandas compat Oct 1, 2026
@chalmerlowe
chalmerlowe merged commit 5d57b25 into main Oct 1, 2026
49 checks passed
@chalmerlowe
chalmerlowe deleted the fix/ci-db-dtypes-docfx-compat branch October 1, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Merge the pull request once unit tests and other checks pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants