v1.3.0
This release adds structured error codes on raised exceptions, Windows ARM64 wheels, and a set of bug fixes for the DB API cursor and server-side bind parameters.
Highlights
Features
- Structured error fields on exceptions. Server errors now expose a numeric
codeattribute with the ClickHouse error code and anameattribute with the symbolic name such asUNKNOWN_TABLEonDatabaseErrorandOperationalError. Callers can branch onexc.codeinstead of parsing the message string.codeis set even whenshow_clickhouse_errorsis disabled. Both default toNonewhen unavailable, such as on transport errors. Closes #786. - Windows ARM64 wheels. Wheels are now built and published for
win_arm64on CPython 3.10 through 3.14, including the free-threaded 3.14 build. Closes #785.
Bug Fixes
- Large query parameter payloads are now automatically sent as form data in the request body instead of the URL query string, so a large
INlist or a high-dimensional vector embedding no longer produces a URL that intermediaries like nginx, AWS ALB, or CloudFront reject with HTTP 414. Queries using binary parameter binds are never promoted automatically and only use form encoding whenform_encode_query_params=Trueis set. Applies to both sync and async clients. Closes #740. - DB API
Cursor.executemanyno longer raisesAttributeErrorwhen rows are passed as sequences instead of mappings. PEP 249 allows sequence rows, and consumers like Airflow'sDbApiHook.insert_rows(executemany=True)pass tuples. uuid.UUID,IPv4Address, andIPv6Addressvalues nested insideArray,Tuple, orMapserver-side bind parameters are now quoted, fixingINlists of UUIDs bound to{name:Array(String)}being rejected by the server. Closes #791.- A datetime parameter whose name genuinely ends in
_64is no longer renamed when the query binds that exact name, fixing placeholders like{param_64:DateTime64(6)}being left unbound. SQLAlchemy hit this withserver_side_params=Trueonce a statement reached 64 anonymous parameters. The documented_64convention still works as before. Closes #790.
Installation
pip install --upgrade clickhouse-connect
Full Changelog: v1.2.0...v1.3.0