#1158

build(phlo-clickhouse): require clickhouse-connect >= 1.11

Openiamgpwants to merge intofrom

Why

This is the second of three PRs before the Python 3.13 CI lanes that ADR 0053 decision 5 requires. clickhouse-connect 0.15.1 builds an array('u') template when its compiled buffer module is imported. Python 3.13 deprecates the 'u' type code and Python 3.16 removes it. Under the repository's filterwarnings = ["error"], every import of phlo_clickhouse on 3.13 fails. That takes down all of phlo-clickhouse, a phlo-sling test, and several core tests: plugin inheritance, phlo doctor, CLI startup metadata, the settings inventory, dependency declarations, and the CI partition. clickhouse-connect 1.4.0 removed the template; its changelog says the package can now be imported under -W error.

Change

  • packages/phlo-clickhouse/pyproject.toml now requires clickhouse-connect>=1.11.0 instead of >=0.8.0. phlo-clickhouse is a preview package.
  • uv.lock was updated with uv lock --upgrade-package clickhouse-connect. The only changes are clickhouse-connect 0.15.1 → 1.11.0, the new backports-zstd dependency (Python < 3.14 only), and dropping pytz/zstandard from clickhouse-connect's dependencies.
  • The examples/lakehouses/clickhouse-ops/uv.lock example lock moves clickhouse-connect from 1.7.2 to 1.11.0. make check-example-locks requires this.

Breaking-change review

I checked MIGRATION.md and the 1.x changelog. The 1.0 breaks are: Python ≥ 3.10, pandas ≥ 2 (the lock has 3.0.6), pytz replaced by zoneinfo, and removal of utc_tz_aware, apply_server_timezone, preserve_pandas_datetime_resolution and the executor-based async client. phlo-clickhouse uses only the sync get_client(host, port, username, password, database, secure), query, command, insert_df and close. phlo-sling gets ClickHouse settings through the provider capability and doesn't import the driver. Neither package uses any removed option.

Verification

  • phlo-clickhouse 46 passed and phlo-sling 61 passed, on both Python 3.12 and 3.13.14.
  • On 3.13, the core tests that failed on main because of this warning now pass (64 passed).
  • python3 scripts/dependency_delta.py --mode delta against main: assessment complete, no newly introduced advisories.
  • make check passes, including check-example-locks.

Activity

313
coldtea-pr-lens[bot]2h ago

NOTE

The title starts with build(phlo-clickhouse):, so PR Lens left this pull request undrawn. Comment @pr-lens draw to draw it

github.comment.notice: false in .github/pr-lens.yml turns this note off

phlo-agent[bot]2h ago

Reviewed at 106d744. No blocking findings.

What holds up

  • The call-site audit is accurate. phlo_clickhouse uses only get_client(host, port, username, password, database, secure) (resource.py L84-L91), query(..., parameters=...), command, insert_df and close. Nothing passes the options the 1.0 migration guide removes, and the preserve_pandas_datetime_resolution removal only changes query_df-style results, which this package never requests.
  • The uv.lock diff is exactly the described scope: backports-zstd 1.8.0 added with cp312/cp313 wheels, clickhouse-connect's pytz/zstandard deps and 0.15.1 wheels replaced by backports-zstd (marker python_full_version < '3.14'), tzdata on Windows, and 1.11.0 wheels for cp312-cp315. No other package moved, and the pytz/zstandard package entries remain because other locked dependencies still require them, so no transitive import regresses.
  • The dbt extra still resolves: the workspace lock pairs 1.11.0 with dbt-clickhouse 1.10.3, and the example's >=1.10,<1.11 pin resolved to 1.11.0 too.
  • No release metadata is stale: phlo-clickhouse is not in the registry/support/v1.json release set, and change-policy leaves package versions to release staging.

Validation still open

Nothing in the repository exercises a live driver. The package tests replace clickhouse_connect.get_client with fakes, and the clickhouse-ops example is CI-first, listing live ClickHouse materialization as unverified without containers. So 1.11.0 is proven by import under filterwarnings = ["error"] and by lock resolution, but query, command and insert_df against a real server rest on the migration-guide reading. The example's live path on 3.13 is the check that would close that gap. CI on this head was still in progress when I looked.