Skip to content

Commit 53595eb

Browse files
prep release 0.9.0 (#552)
* prep release 0.9.0 * allow double quotes
1 parent 629858a commit 53595eb

File tree

4 files changed

+48
-28
lines changed

4 files changed

+48
-28
lines changed

CHANGELOG.md

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,36 +22,47 @@ instead of being passed as ClickHouse server settings. This is in conjunction wi
2222
The supported method of passing ClickHouse server settings is to prefix such arguments/query parameters with`ch_`.
2323

2424
## UNRELEASED
25-
- Add support for lightweight `DELETE` in sqlalchemy. Closes [#382](https://github.com/ClickHouse/clickhouse-connect/issues/382)
26-
- Added client connection option `rename_response_column` (default `None`) that allows the user to define how response columns are automatically renamed according to a predefined scheme. Helpful for stripping alias prefixes, etc. in potentially complex queries. Closes [#228](https://github.com/ClickHouse/clickhouse-connect/issues/228)
27-
- Add third-party library identifiers (name/version) in the User-Agent, e.g. pandas/2.2.5. Users can opt out by changing the common setting `send_integration_tags` to `False`.
28-
- Added support for form encoding query parameters when using HTTP interface. This addresses [#342](https://github.com/ClickHouse/clickhouse-connect/issues/342). Query parameters can now be sent as form-encoded data in the request body by setting `form_encode_query_params=True` when creating the client. This is particularly useful for queries with large parameter payloads that might exceed URL length limits.
29-
- Added Polars support for Arrow-based query and insert methods (query_df_arrow, query_df_arrow_stream, insert_df_arrow). This initial implementation provides basic dataframe conversion through the Arrow format, similar to how we support the pyarrow-backed pandas dataframes. Closes [#111](https://github.com/ClickHouse/clickhouse-connect/issues/111) and [#542](https://github.com/ClickHouse/clickhouse-connect/issues/542)
25+
26+
27+
## 0.9.0, 2025-09-16
28+
29+
### Breaking Changes
30+
- **WARNING: BREAKING CHANGE** — Removed support for sqlalchemy 1.3 which reached its EOL in 2021. The minimum required version is now 1.4.40.
31+
- **WARNING: BREAKING CHANGE** — Behavior for reading from IPv6 columns has changed:
32+
- With `read_format='native'`, the client will **always** return [`ipaddress.IPv6Address`](https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv6Address) objects, even for IPv4-mapped addresses (e.g., `"::ffff:192.168.1.1"`). Previously, the client returned [`ipaddress.IPv4Address`](https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Address) objects for these cases. This change enforces type consistency and avoids surprising implicit conversions. If your application requires IPv4 objects, you can explicitly convert using the [`ipv4_mapped`](https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv6Address.ipv4_mapped) attribute of `IPv6Address`.
33+
- With `read_format='string'`, the client will **always** return IPv6 string representations, e.g., `"::ffff:192.168.1.1"` instead of `"192.168.1.1"`, for the same reasons as above. If you require only the IPv4 string, you can parse or truncate this in your application code.
34+
- Closes [#493](https://github.com/ClickHouse/clickhouse-connect/issues/493)
35+
36+
### Major Features
3037
- Added support for SQLAlchemy 2.x. The minimum required version is 1.4.40. Closes [#263](https://github.com/ClickHouse/clickhouse-connect/issues/263)
31-
- **WARNING: BREAKING CHANGE**: Removed support for sqlalchemy 1.3 which reached its EOL in 2021.
38+
- Added Polars support for Arrow-based query and insert methods (`query_df_arrow`, `query_df_arrow_stream`, `insert_df_arrow`). This initial implementation provides basic dataframe conversion through the Arrow format, similar to how we support the pyarrow-backed pandas dataframes. Closes [#111](https://github.com/ClickHouse/clickhouse-connect/issues/111) and [#542](https://github.com/ClickHouse/clickhouse-connect/issues/542)
3239
- Added support for querying/inserting pyarrow-backed DataFrames:
3340
- `query_df_arrow()`: returns a pandas DataFrame with PyArrow dtype backend. Note that Arrow data types are preserved without additional conversions.
3441
- `query_df_arrow_stream()`: Streaming version of `query_df_arrow()` for processing large result sets.
3542
- `insert_df_arrow()`: Optimized insertion method for pandas DataFrames with PyArrow backend, which should provide better performance than standard `insert_df()`.
43+
- Added Time and Time64 type support. Closes [#509](https://github.com/ClickHouse/clickhouse-connect/issues/509)
44+
- Support for both pandas 1.x and 2.x.
45+
- Added support for Nullable(JSON) types
46+
- Added support for BFloat16 types
47+
48+
### Improvements
49+
- Add support for lightweight `DELETE` in sqlalchemy. Closes [#382](https://github.com/ClickHouse/clickhouse-connect/issues/382)
50+
- Added support for `SELECT`/`JOIN` operations via SQLAlchemy's core API (table operations and explicit statements--not ORM sessions-based queries)
51+
- Added client connection option `rename_response_column` (default `None`) that allows the user to define how response columns are automatically renamed according to a predefined scheme. Helpful for stripping alias prefixes, etc. in potentially complex queries. Closes [#228](https://github.com/ClickHouse/clickhouse-connect/issues/228)
52+
- Add third-party library identifiers (name/version) in the User-Agent, e.g. pandas/2.2.5. Users can opt out by changing the common setting `send_integration_tags` to `False`.
53+
- Added support for form encoding query parameters when using HTTP interface. This addresses [#342](https://github.com/ClickHouse/clickhouse-connect/issues/342). Query parameters can now be sent as form-encoded data in the request body by setting `form_encode_query_params=True` when creating the client. This is particularly useful for queries with large parameter payloads that might exceed URL length limits.
3654
- Added support for special [interval types](https://clickhouse.com/docs/en/sql-reference/data-types/special-data-types/interval). Closes [#391](https://github.com/ClickHouse/clickhouse-connect/issues/391)
37-
- Added new common setting option "preserve_pandas_datetime_resolution" (default is `False`) allowing pandas 2.x users to opt into (when set to `True`) using the additional pandas 2.x datetime64/timedelta64 resolutions of "s", "ms", "us". If set to `False` or using pandas 1.x, all datetime64/timedelta64 resolutions will be coerced to "ns". (See [here](https://pandas.pydata.org/docs/whatsnew/v2.0.0.html#construction-with-datetime64-or-timedelta64-dtype-with-unsupported-resolution) for more info). Closes [#165](https://github.com/ClickHouse/clickhouse-connect/issues/165) and [#531](https://github.com/ClickHouse/clickhouse-connect/issues/531)
38-
- Support for both pandas 1.x and 2.x
39-
- Added pandas 1.x/2.x compatibility tests to CI
55+
- Added new common setting option "preserve_pandas_datetime_resolution" (default is `False`) allowing pandas 2.x users to opt into (when set to `True`) using the additional pandas 2.x datetime64/timedelta64 resolutions of "s", "ms", "us". If set to `False` or using pandas 1.x, all datetime64/timedelta64 resolutions will be coerced to "ns". (See [here](https://pandas.pydata.org/docs/whatsnew/v2.0.0.html#construction-with-datetime64-or-timedelta64-dtype-with-unsupported-resolution) for more info). Closes [#165](https://github.com/ClickHouse/clickhouse-connect/issues/165) and [#531](https://github.com/ClickHouse/clickhouse-connect/issues/531)
4056
- Tightens up type consistency of date-like objects when using `query_df`
41-
- Fixes problem with df inserts of Time and Time64 types. Closes [#524](https://github.com/ClickHouse/clickhouse-connect/issues/524)
42-
- Added Time and Time64 type support and relevant tests. Closes [#509](https://github.com/ClickHouse/clickhouse-connect/issues/509)
43-
- **WARNING: BREAKING CHANGE** — Behavior for reading from IPv6 columns has changed:
44-
- With `read_format='native'`, the client will **always** return [`ipaddress.IPv6Address`](https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv6Address) objects, even for IPv4-mapped addresses (e.g., `"::ffff:192.168.1.1"`). Previously, the client returned [`ipaddress.IPv4Address`](https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Address) objects for these cases. This change enforces type consistency and avoids surprising implicit conversions. If your application requires IPv4 objects, you can explicitly convert using the [`ipv4_mapped`](https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv6Address.ipv4_mapped) attribute of `IPv6Address`.
45-
- With `read_format='string'`, the client will **always** return IPv6 string representations, e.g., `"::ffff:192.168.1.1"` instead of `"192.168.1.1"`, for the same reasons as above. If you require only the IPv4 string, you can parse or truncate this in your application code.
46-
- Closes [#493](https://github.com/ClickHouse/clickhouse-connect/issues/493)
47-
- When writing to an IPv6 column type, the client will "promote" IPv4 addresses to IPv4-mapped IPv6 addresses to prevent write errors: Closes [#498](https://github.com/ClickHouse/clickhouse-connect/issues/498)
57+
- When writing to an IPv6 column type, the client will "promote" IPv4 addresses to IPv4-mapped IPv6 addresses to prevent write errors. Closes [#498](https://github.com/ClickHouse/clickhouse-connect/issues/498)
4858
- Changed `AsyncClient.settings` typing to `Optional[Dict[str, Any]]` to accept None inputs.
4959
- Added more robust error handling and tests. Closes [#508](https://github.com/ClickHouse/clickhouse-connect/issues/508)
50-
- Fixed an AttributeError on `http.client` when importing `clickhouse_connect` under certain circumstances
51-
- Added support for Nullable(JSON) types
52-
- Added support for BFloat16 types
5360
- Replace the use of deprecated `datetime.utcfromtimestamp`
5461

62+
### Bug Fixes
63+
- Fixed an AttributeError on `http.client` when importing `clickhouse_connect` under certain circumstances
64+
- Fixes problem with df inserts of Time and Time64 types. Closes [#524](https://github.com/ClickHouse/clickhouse-connect/issues/524)
65+
5566
## 0.8.18, 2025-06-24
5667

5768
### Improvements

README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
A high performance core database driver for connecting ClickHouse to Python, Pandas, and Superset
44

5-
* Pandas DataFrames
5+
* Pandas DataFrames (numpy and arrow-backed)
66
* Numpy Arrays
77
* PyArrow Tables
8+
* Polars DataFrames
89
* Superset Connector
9-
* SQLAlchemy 1.3 and 1.4 (limited feature set)
10+
* SQLAlchemy Core (select, joins, lightweight deletes; limited feature set)
1011

1112
ClickHouse Connect currently uses the ClickHouse HTTP interface for maximum compatibility.
1213

@@ -16,7 +17,7 @@ ClickHouse Connect currently uses the ClickHouse HTTP interface for maximum comp
1617
pip install clickhouse-connect
1718
```
1819

19-
ClickHouse Connect requires Python 3.8 or higher.
20+
ClickHouse Connect requires Python 3.9 or higher. We officially test against Python 3.9 through 3.13.
2021

2122
### Superset Connectivity
2223

@@ -30,9 +31,17 @@ When creating a Superset Data Source, either use the provided connection dialog,
3031

3132
### SQLAlchemy Implementation
3233

33-
ClickHouse Connect incorporates a minimal SQLAlchemy implementation (without any ORM features) for compatibility with
34-
Superset. It has only been tested against SQLAlchemy versions 1.3.x and 1.4.x, and is unlikely to work with more
35-
complex SQLAlchemy applications.
34+
ClickHouse Connect includes a lightweight SQLAlchemy dialect implementation focused on compatibility with **Superset**
35+
and **SQLAlchemy Core**.
36+
37+
Supported features include:
38+
- Basic query execution via SQLAlchemy Core
39+
- `SELECT` queries with `JOIN`s
40+
- Lightweight `DELETE` statements
41+
42+
The implementation does not include ORM support and is not intended as a full SQLAlchemy dialect. While it can support
43+
a range of Core-based applications beyond Superset, it may not be suitable for more complex SQLAlchemy applications
44+
that rely on full ORM or advanced dialect functionality.
3645

3746
### Asyncio Support
3847

@@ -42,4 +51,4 @@ See the [run_async example](./examples/run_async.py) for more details.
4251
### Complete Documentation
4352

4453
The documentation for ClickHouse Connect has moved to
45-
[ClickHouse Docs](https://clickhouse.com/docs/integrations/python)
54+
[ClickHouse Docs](https://clickhouse.com/docs/integrations/python)

clickhouse_connect/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = '0.8.18'
1+
version = "0.9.0"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def run_setup(try_c: bool = True):
3737
else:
3838
with open(os.path.join(project_dir, 'clickhouse_connect', '__version__.py'), encoding='utf-8') as version_file:
3939
file_version = version_file.read().strip()
40-
match = re.search(r"version\s*=\s*'(.+)'", file_version)
40+
match = re.search(r"version\s*=\s*['\"](.+)['\"]", file_version)
4141
if match is None:
4242
raise ValueError(f'invalid version {file_version} in clickhouse_connect/__version__.py')
4343
version = match.group(1)

0 commit comments

Comments
 (0)