Skip to content

build(deps): bump clickhouse-connect from 1.1.1 to 1.6.0 - #48

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/clickhouse-connect-1.6.0
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/clickhouse-connect-1.6.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 27, 2026

Copy link
Copy Markdown

Bumps clickhouse-connect from 1.1.1 to 1.6.0.

Release notes

Sourced from clickhouse-connect's releases.

v1.6.0

What's Changed

clickhouse-connect 1.6.0 adds an experimental in-process chDB backend, resolves several sync/async client parity bugs, and replaces the zstandard dependency with the standard library/a backport. Internally, the sync and async HTTP clients were unified onto a shared backend core, which is what enables the chDB backend and fixes the async issues below.

Features

  • Added an experimental in-process chDB backend. get_client(interface='chdb') or a chdb:// DSN returns a standard client that runs queries against an embedded chDB engine instead of a ClickHouse server, supporting the full query, insert, streaming, and Arrow client surface. Use the path argument or a chdb:///on/disk/path DSN for a persistent database. Requires the chdb package, installable with pip install clickhouse-connect[chdb]. chDB allows one engine per process, has no async client, and does not support external data. (#872)

Bug Fixes

  • AsyncClient initialization no longer overwrites user-supplied session settings with generated defaults which no matches the sync client. (#872)
  • An AsyncClient created with both client certificates and an access token now sends the mutual TLS authentication headers and the Authorization: Bearer header together which now also matches the sync client. (#872)
  • Dict-valued settings such as additional_table_filters no longer crash with DB::Exception: Cannot parse quoted string when passed through query()'s settings parameter. Closes #501.

Improvements

  • Async clients now emit URL query parameters in the same order as the sync client on every request. (#872)
  • Client creation no longer fails when the client_protocol_version capability probe errors on the sync client; it now falls back gracefully and logs at debug level, matching the async client.
  • Replaced the zstandard dependency with the stdlib compression.zstd module (Python 3.14+) and backports.zstd (Python 3.10-3.13), giving a single consistent call surface across all supported Python versions. zstd compression remains fully supported on all standard Python installs. Closes #577.

Under the hood

  • The sync and async HTTP clients were refactored onto a shared, internal pluggable-backend core (asyncclient.py shrank by roughly 1,200 lines of duplicated logic). This is an internal change with no public API surface, but it's the basis for the chDB backend and the sync/async parity fixes above. (#872)

Installation

pip install clickhouse-connect

v1.5.0

clickhouse-connect 1.5.0

This is a feature release focused on the SQLAlchemy and Alembic integration, alongside two important correctness fixes on the core driver. Alembic gains first-class support for ClickHouse-specific DDL, SQLAlchemy gains per-query settings and typed ClickHouse query chainables, and Variant columns gain a new lossless read format. On the driver side, this release fixes a data-corruption bug when decoding large varints on the compiled path and a QBit corruption bug for dimensions greater than 8.

Highlights

Features

  • Alembic support for ClickHouse-specific DDL. New runtime Alembic operations cover skip indexes, projections, table settings, materialized views, and dictionaries, including plural add/drop helpers for indexes and projections. The plural helpers emit a single comma-joined ALTER TABLE so replicated deployments avoid the Code: 517 CANNOT_ASSIGN_ALTER race. Helpers render valid SQL in offline --sql mode. #839
  • Per-query ClickHouse settings in SQLAlchemy. execution_options(settings={...}) now forwards per-query settings through the dialect and DB-API cursor for Core and text() statements, execute, executemany, and the bulk-insert path. Settings set at the connection or engine level compose with per-statement settings, and per-statement values take precedence, so a connection-level default applies to implicit ORM queries such as selectinload and lazy loads. #838, #846
  • Chainable JOIN modifiers. A new Select.ch_join() lets ClickHouse JOIN modifiers be written in normal SQLAlchemy chaining style. It takes the strictness modifiers ALL, ANY, ASOF, SEMI, and ANTI, the GLOBAL distribution modifier, plus USING and CROSS as keyword arguments. The existing ch_join() factory is unchanged. #827
  • Typed ClickHouse select. cc_sqlalchemy.select() returns a ClickHouseSelect exposing ch_join, final, sample, array_join, prewhere, and limit_by as typed methods, so static type checkers accept them without suppressions. The standard sqlalchemy.select() path is unchanged. #837
  • typed read format for Variant columns. When two members of a Variant share a Python type, such as Variant(Float32, Float64), reading with the typed format wraps each value as a TypedVariant carrying both the value and its type_name, and these feed straight back into inserts. Enable per query with query_formats={'Variant': 'typed'} or globally with set_read_format('Variant', 'typed'). The default native format is unchanged. #825

Bug Fixes

  • Fixed corruption of QBit columns with a dimension greater than 8 on native inserts and reads. Data written by earlier clients was stored incorrectly and should be re-inserted. See the upgrade note below. #866
  • The compiled Cython response buffer now decodes LEB128 varint values of 2^31 and larger correctly. Each 7-bit group was shifted in signed 32-bit arithmetic before being widened, so any varint of 2^31 or more was truncated or corrupted. This affected string and nullable string column lengths and every other varint read on the compiled path. The pure Python reader was already correct. #828
  • command() now returns an empty string for a read that produces an empty result set, instead of a truthy QuerySummary that made if result: misleading. #865
  • DB API Cursor.executemany no longer falls off the bulk-insert fast path when an INSERT names backtick-quoted dotted columns such as the wire form of Nested sub-columns. unescape_identifier now removes backtick quoting from compound identifiers correctly, which previously degraded the operation to slow per-row execution and could raise ProgrammingError with dict rows and pyformat placeholders. #820

SQLAlchemy Bug Fixes

... (truncated)

Changelog

Sourced from clickhouse-connect's changelog.

1.6.0, 2026-07-23

Bug Fixes

  • AsyncClient initialization no longer overwrites user-supplied session settings with generated defaults. A client created with settings={'date_time_input_format': 'basic'} previously had that value replaced by the generated best_effort default. User settings now always win, matching the sync client.
  • An AsyncClient created with both client certificates and an access token now sends the mutual TLS authentication headers and the Authorization: Bearer header together, matching the sync client. The certificates previously suppressed the token at construction, while the token_provider option re-added its token right after initialization, so the two async token paths disagreed with each other. The server resolves the credential precedence.
  • Dict-valued settings such as additional_table_filters no longer crash with DB::Exception: Cannot parse quoted string when passed through query()'s settings parameter. The value was rendered with Python's own str()/repr() of the dict, which mixes single and double quotes and is not valid ClickHouse map-literal syntax; it is now rendered as a properly single-quoted, escaped ClickHouse map literal. Closes #501.

Improvements

  • Async clients now emit URL query parameters in the same order as the sync client on every request. The parameter names and values are unchanged, so this is only visible to systems that match or sign the exact request URL.
  • Client creation no longer fails when the client_protocol_version capability probe errors on the sync client. The client falls back to running without the newer native protocol features and logs the probe failure at debug level, matching the async client.
  • Added an experimental in-process chDB backend. get_client(interface='chdb') or a chdb:// DSN returns a standard client that runs queries against an embedded chDB engine instead of a ClickHouse server, supporting the full query, insert, streaming, and Arrow client surface. Use the path argument or a chdb:///on/disk/path DSN for a persistent database. Requires the chdb package, installable with pip install clickhouse-connect[chdb]. chDB allows one engine per process, has no async client, and does not support external data.
  • Replaced the zstandard dependency with the stdlib compression.zstd module (Python 3.14+) and backports.zstd (Python 3.10-3.13), which provides the same API as the stdlib module. This gives a single consistent call surface across all supported Python versions and removes a dependency that diverges from the standard library. zstd compression remains fully supported on all standard Python installs. In the rare case of a custom CPython 3.14+ interpreter compiled without zstd support, the driver now still imports, drops zstd from the advertised compression methods, and raises a clear error only if zstd is explicitly requested. Closes #577.

1.5.0, 2026-07-15

Bug Fixes

  • SQLAlchemy: the Alembic op.rename_table now emits RENAME TABLE old TO new. It previously emitted the standard ALTER TABLE old RENAME TO new, which ClickHouse rejects. Standard SQLAlchemy indexes are now filtered from ClickHouse autogenerate output, and Column(index=True), Index(...), op.create_index, and op.drop_index raise a clear Alembic error before partially applying DDL. Use the ClickHouse-specific op.add_clickhouse_index and op.drop_clickhouse_index helpers for data-skipping indexes. Part of #839.
  • SQLAlchemy: fixed several Alembic ClickHouse DDL helper edge cases. Raw SQL fragments containing :name are no longer parsed as SQLAlchemy bind parameters, dictionary comments now escape backslashes correctly, explicit schemas are honored for legal dotted table names, CREATE MATERIALIZED VIEW no longer accepts a misleading clickhouse_settings suffix that ClickHouse stores inside the SELECT definition, and custom ClickHouse operation objects now render through Alembic autogenerate instead of raising ValueError. Part of #839.
  • SQLAlchemy: ClickHouseSelect now keeps its typed ClickHouse chainables after column-shape methods such as add_columns(), with_only_columns(), column(), and reduce_columns(). cc_sqlalchemy.select() also works on SQLAlchemy 1.4. Closes #844.
  • SQLAlchemy: wrapping a ClickHouse type in a SQLAlchemy TypeDecorator no longer raises TypeError: result_processor() takes 0 positional arguments but 2 were given when reading results. Closes #847.
  • SQLAlchemy: MergeTree engine key clauses (order_by, partition_by, primary_key, sample_by, ttl) now accept arbitrary SQL expressions such as col.desc(), func.cityHash64(a, b), tuple_(...), and interval TTL expressions, in scalar and list forms. Expressions were previously either rejected with a TypeError in list form or rendered through the wrong dialect in scalar form. Plain strings, text(), and bare Column inputs render exactly as before, and expression engines round-trip through repr() for Alembic autogeneration. Closes #845.
  • SQLAlchemy: has_database() now uses EXISTS DATABASE instead of querying system.databases. On ClickHouse servers from 25.10 through 26.4 system.databases omitted DataLakeCatalog and other remote databases by default, so has_database() reported False for databases that actually exist and broke schema-existence checks. EXISTS DATABASE consults the database catalog directly and is correct on every server version. Closes #849.
  • SQLAlchemy: MATERIALIZED and ALIAS columns now keep their comment, codec, and ttl options in generated DDL. Column clauses are also now emitted in the order ClickHouse requires, COMMENT then CODEC then TTL, which fixes a separate pre-existing case where any column that combined a codec with a comment produced invalid SQL that the server rejected. DEFAULT, MATERIALIZED, and ALIAS remain mutually exclusive. Closes #856.
  • DB API Cursor.executemany no longer silently falls off the bulk insert fast path when an INSERT names backtick-quoted dotted columns, the wire form of Nested sub-columns such as `directory`.`id`. unescape_identifier stripped only the outermost backtick pair, so the normalized column names kept their inner backticks and never matched the row dict keys. The comparison always failed, so the operation degraded to slow per-row execution, and with dict rows and pyformat placeholders it could raise ProgrammingError. unescape_identifier now removes backtick quoting from compound identifiers correctly. Closes #820.
  • The compiled Cython response buffer now decodes LEB128 varint values of 2^31 and larger correctly. Each 7-bit group was shifted in signed 32-bit arithmetic before being widened to the 64-bit accumulator, so any varint of 2^31 or more was truncated or corrupted. This affected string and nullable string column lengths and every other varint read on the compiled path. The pure Python reader was already correct. Closes #828.
  • command() now returns an empty string for a read that produces an empty result set, instead of a truthy QuerySummary that made if result: misleading. Closes #865.
  • Native inserts and reads of QBit columns with a dimension greater than 8 no longer corrupt the vector. Data written by earlier clients was stored incorrectly and should be re-inserted. Closes #866.

Improvements

  • SQLAlchemy: added runtime Alembic operations for ClickHouse-specific DDL. The new helpers cover skip indexes, projections, table settings, materialized views, and dictionaries, including plural add/drop helpers for indexes and projections. The plural index and projection helpers emit a single comma-joined ALTER TABLE, so replicated deployments avoid the Code: 517 CANNOT_ASSIGN_ALTER race that separate statements can trigger. Helpers render valid SQL in offline --sql mode, and helpers whose signature includes clickhouse_settings render that mapping as an inline SETTINGS clause. Closes #839.
  • SQLAlchemy: added a chainable Select.ch_join() so ClickHouse JOIN modifiers can be written in normal SQLAlchemy chaining style instead of nesting the ch_join() helper inside select_from(). It takes the strictness modifiers ALL, ANY, ASOF, SEMI, and ANTI, the GLOBAL distribution modifier, plus USING and CROSS, all as keyword arguments, and chains so multi-join queries stay readable. The existing ch_join() factory is unchanged. Closes #827.
  • SQLAlchemy: added cc_sqlalchemy.select() which returns a ClickHouseSelect. It exposes the ClickHouse chainable modifiers such as ch_join, final, sample, array_join, prewhere, and limit_by as typed methods so static type checkers accept them without suppressions. The existing sqlalchemy.select() path keeps working unchanged. Closes #837.
  • SQLAlchemy: execution_options(settings={...}) now forwards per-query ClickHouse settings through the dialect and DB-API cursor instead of silently ignoring them. This works for Core and text() statements, connection-level execution options, execute, executemany, and the bulk-insert path, while continuing to use the existing client settings validation. Settings set at the connection or engine level compose with per-statement settings, with the per-statement value taking precedence for any key set at both levels, so a connection or engine level default applies to every execution including implicit ORM queries such as selectinload and lazy attribute loads without overriding explicit per-query settings. Closes #838 and #846.
  • Added a typed read format for Variant columns. When two members of a Variant share a Python type, such as Variant(DateTime, DateTime64(3)) or Variant(Float32, Float64), the decoded value alone did not record which member produced it, so the originating ClickHouse type was unrecoverable. Reading with the typed format wraps each value as a TypedVariant carrying both the value and its type_name, and these values feed straight back into inserts. The default read format stays native and returns bare values as before, so existing behavior is unchanged. Enable it per query with query_formats={'Variant': 'typed'} or globally with set_read_format('Variant', 'typed'). Closes #825.

1.4.2, 2026-07-06

Bug Fixes

  • Async inserts and queries with an in-memory body larger than 1 MiB no longer emit an aiohttp ResourceWarning about sending a large body directly with raw bytes. Closes #850.

1.4.1, 2026-06-30

Bug Fixes

  • SQLAlchemy: importing the ClickHouse Alembic integration no longer changes Alembic autogenerate output for other database dialects. The ClickHouse renderers for CreateTableOp, AddColumnOp, and DropTableOp were registered as process-wide replacements with no dialect guard, because Alembic renderers have no per-dialect dispatch. Any non-ClickHouse autogenerate run in the same process then used the ClickHouse renderers, which dropped the nullable argument from columns whose nullability was not set explicitly and injected cc_sqlalchemy imports. The renderers now fall back to Alembic's built-in rendering for non-ClickHouse dialects. Closes #832.
  • Several public AsyncClient methods now carry the return-type annotations their sync Client counterparts already had. close, close_connections, query_np, query_df, query_arrow, set_client_setting, and set_access_token were missing them, so downstream projects running mypy with --disallow-untyped-calls got no-untyped-call errors on calls like await client.close() once the package began shipping py.typed in 1.4.0. The async client surface is now fully annotated. This is a type-only change with no runtime effect. Closes #831.

1.4.0, 2026-06-29

Bug Fixes

... (truncated)

Commits
  • 2417137 release prep for v1.6.0 (#893)
  • 437a7d6 docs refresh (#891)
  • 98371b7 Replace zstandard with backports.zstd / stdlib compression.zstd (#577) (#877)
  • a29cf10 publish wheels to PyPI with trusted publishing instead of API tokens (#888)
  • f57a134 Refactor: implement pluggable backend architecture (#872)
  • 47dbad3 fix test failing on head (#876)
  • 91c8ef9 Docs: move integration metadata from index.mdx comment to docs/_meta.yml (#875)
  • 8a60e11 fix: escape dict-valued settings as ClickHouse map literals (#501) (#874)
  • 44ec560 adding metadata comment for website usage (#873)
  • 4c7f046 Update additional-options.mdx (#871)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [clickhouse-connect](https://github.com/ClickHouse/clickhouse-connect) from 1.1.1 to 1.6.0.
- [Release notes](https://github.com/ClickHouse/clickhouse-connect/releases)
- [Changelog](https://github.com/ClickHouse/clickhouse-connect/blob/main/CHANGELOG.md)
- [Commits](ClickHouse/clickhouse-connect@v1.1.1...v1.6.0)

---
updated-dependencies:
- dependency-name: clickhouse-connect
  dependency-version: 1.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Jul 27, 2026
@dependabot @github

dependabot Bot commented on behalf of github Aug 17, 2026

Copy link
Copy Markdown
Author

Superseded by #51.

@dependabot dependabot Bot closed this Aug 17, 2026
@dependabot
dependabot Bot deleted the dependabot/pip/clickhouse-connect-1.6.0 branch August 17, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants