Skip to content

Commit cd8cbf4

Browse files
Joe/remove pytyped and other small cleanup issues (#693)
* remove pytyped * remove reference to old VERSION file * readme correctness updates and clarifications
1 parent 05859ef commit cd8cbf4

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ The supported method of passing ClickHouse server settings is to prefix such arg
3030
- SQLAlchemy: Add missing Replicated table engine variants: `ReplicatedReplacingMergeTree`, `ReplicatedCollapsingMergeTree`, `ReplicatedVersionedCollapsingMergeTree`, and `ReplicatedGraphiteMergeTree`. Closes [#687](https://github.com/ClickHouse/clickhouse-connect/issues/687)
3131
- Lazy imports for optional dependencies (numpy, pandas, pyarrow, polars). If installed, these heavy libraries are no longer imported at `import clickhouse_connect` time. They are only imported when features that need them are actually used. The C/Numpy optimization bridge is also deferred. This speeds up bare import time of `clickhouse-connect` about 4X in environments where all four are installed. Closes [#589](https://github.com/ClickHouse/clickhouse-connect/issues/589)
3232

33+
### Other
34+
- Remove `py.typed` marker file. The package does not have comprehensive type annotations, so the PEP 561 marker was causing false type errors for mypy/pyright users. Closes [#691](https://github.com/ClickHouse/clickhouse-connect/issues/691)
35+
3336
### Bug Fixes
3437
- SQLAlchemy: Fix `.final()` and `.sample()` silently overwriting each other when chained. Both methods now store modifiers as custom attributes on the `Select` instance and render them during compilation, replacing the previous `with_hint()` approach that only allowed one hint per table. Chaining in either order (e.g. `select(t).final().sample(0.1)`) correctly produces `FROM t FINAL SAMPLE 0.1`. Also fixes rendering for aliased tables (`FROM t AS u FINAL`) and supports explicit table targeting in joins. Fixes [#658](https://github.com/ClickHouse/clickhouse-connect/issues/658)
3538
- SQLAlchemy: Fix `sqlalchemy.values()` to generate ClickHouse's `VALUES` table function syntax. The compiler now emits `VALUES('col1 Type1, col2 Type2', ...)` with the column structure as the first argument, instead of the standard SQL form that places column names after the alias. Generic SQLAlchemy types are mapped to ClickHouse equivalents (e.g. `Integer` to `Int32`, `String` to `String`). Also handles CTE usage by wrapping in `SELECT * FROM VALUES(...)`. Fixes [#681](https://github.com/ClickHouse/clickhouse-connect/issues/681)

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

5-
* Pandas DataFrames (numpy and arrow-backed)
5+
* Pandas DataFrames (numpy and arrow-backed). Pandas 2.x and above only, 1.x is deprecated and will be dropped in 1.0.
66
* Numpy Arrays
77
* PyArrow Tables
88
* Polars DataFrames
@@ -17,7 +17,8 @@ ClickHouse Connect currently uses the ClickHouse HTTP interface for maximum comp
1717
pip install clickhouse-connect
1818
```
1919

20-
ClickHouse Connect requires Python 3.9 or higher. We officially test against Python 3.9 through 3.13.
20+
ClickHouse Connect requires Python 3.9 or higher. We officially test against Python 3.10 through 3.14.
21+
Python 3.9 is deprecated and support will be removed entirely in 1.0.
2122

2223
### Superset Connectivity
2324

@@ -52,9 +53,14 @@ are not implemented. The dialect is best suited for SQLAlchemy Core usage and Su
5253

5354
### Asyncio Support
5455

55-
ClickHouse Connect provides an async wrapper, so that it is possible to use the client in an `asyncio` environment.
56+
ClickHouse Connect provides an `AsyncClient` for use in `asyncio` environments.
5657
See the [run_async example](./examples/run_async.py) for more details.
5758

59+
The current `AsyncClient` is a thread-pool executor wrapper around the synchronous client and is deprecated.
60+
In 1.0.0 it will be replaced by a fully native async implementation. The API surface is the same,
61+
with one difference: you will no longer be able to create a sync client first and pass it to the
62+
`AsyncClient` constructor. Instead, use `clickhouse_connect.get_async_client()` directly.
63+
5864
### Complete Documentation
5965

6066
The documentation for ClickHouse Connect has moved to

clickhouse_connect/py.typed

Whitespace-only changes.

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def run_setup(try_c: bool = True):
5151
version=version,
5252
long_description=long_desc,
5353
long_description_content_type='text/markdown',
54-
package_data={'clickhouse_connect': ['VERSION', 'py.typed']},
5554
url='https://github.com/ClickHouse/clickhouse-connect',
5655
packages=find_packages(exclude=['tests*']),
5756
python_requires='>=3.9,<3.15',

0 commit comments

Comments
 (0)