Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ jobs:
- '3.11'
- '3.12'
- '3.13'
- '3.14'
clickhouse-version:
- '25.3' # LTS
- '25.6' # Stable
- '25.7' # Stable
- '25.8' # LTS
- '25.9' # Stable
Expand Down Expand Up @@ -208,6 +208,7 @@ jobs:
- '3.11'
- '3.12'
- '3.13'
- '3.14'

steps:
- name: Checkout
Expand Down
27 changes: 14 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ on:
- release
- build
env:
CIBW_SKIP: 'cp36-* cp37-* cp38-* pp37-* pp38-*'
CIBW_SKIP: 'cp38-* pp37-* pp38-*'

jobs:
build_x86_manylinux_wheels:
name: Build x86 manylinux wheels on Linux
runs-on: ubuntu-latest
env:
CIBW_SKIP: 'cp36-* cp37-* cp38-* pp37-* pp38-* *-musllinux*'
CIBW_SKIP: 'cp38-* pp37-* pp38-* *-musllinux*'
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v2.22.0
uses: pypa/cibuildwheel@v3.2.1
- uses: actions/upload-artifact@v4
with:
name: build-x86-manylinux
Expand All @@ -33,11 +33,11 @@ jobs:
name: Build x86 musllinux wheels on Linux
runs-on: ubuntu-latest
env:
CIBW_SKIP: 'cp36-* cp37-* cp38-* pp37-* pp38-* *-manylinux*'
CIBW_SKIP: 'cp38-* pp37-* pp38-* *-manylinux*'
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v2.22.0
uses: pypa/cibuildwheel@v3.2.1
- uses: actions/upload-artifact@v4
with:
name: build-x86-musllinux
Expand All @@ -48,15 +48,15 @@ jobs:
runs-on: ubuntu-latest
env:
CIBW_ARCHS_LINUX: aarch64
CIBW_SKIP: 'cp36-* cp37-* cp38-* pp* *-musllinux*'
CIBW_SKIP: 'cp38-* pp* *-musllinux*'
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.22.0
uses: pypa/cibuildwheel@v3.2.1
- uses: actions/upload-artifact@v4
with:
name: build-aarch64-manylinux
Expand All @@ -67,15 +67,15 @@ jobs:
runs-on: ubuntu-latest
env:
CIBW_ARCHS_LINUX: aarch64
CIBW_SKIP: 'cp36-* cp37-* cp38-* pp* *-manylinux*'
CIBW_SKIP: 'cp38-* pp* *-manylinux*'
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.22.0
uses: pypa/cibuildwheel@v3.2.1
- uses: actions/upload-artifact@v4
with:
name: build-aarch64-musllinux
Expand All @@ -86,15 +86,16 @@ jobs:
runs-on: ubuntu-latest
env:
CIBW_ARCHS_LINUX: aarch64
CIBW_BUILD: 'pp39-* pp310-*'
CIBW_BUILD: 'pp39-* pp310-* pp311-*'
CIBW_ENABLE: 'pypy'
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.22.0
uses: pypa/cibuildwheel@v3.2.1
- uses: actions/upload-artifact@v4
with:
name: build-aarch64-pypy
Expand All @@ -106,7 +107,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v2.22.0
uses: pypa/cibuildwheel@v3.2.1
env:
CIBW_ARCHS_MACOS: x86_64 arm64
- uses: actions/upload-artifact@v4
Expand All @@ -122,7 +123,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v2.22.0
uses: pypa/cibuildwheel@v3.2.1
- uses: actions/upload-artifact@v4
with:
name: build-windows
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The supported method of passing ClickHouse server settings is to prefix such arg
- Fixed issue with JSON key dot escaping. Closes [#571](https://github.com/ClickHouse/clickhouse-connect/issues/571)

### Improvements
- Added Python 3.14 and PyPy 3.11 build support
- Added `utc_tz_aware` parameter to client and query methods to opt in to returning timezone-aware UTC objects for DateTime/DateTime64 columns. Default behavior remains the same and returns tz naive objects for backward compatibility. Note: this parameter will likely be removed and only return tz-aware dts in some future release. Closes [#566](https://github.com/ClickHouse/clickhouse-connect/issues/566)

## 0.9.2, 2025-09-25
Expand Down
8 changes: 7 additions & 1 deletion clickhouse_connect/driver/compression.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import sys
import zlib
from abc import abstractmethod
from typing import Union

import lz4
import lz4.frame
import zstandard

# Python 3.14+ includes zstd in stdlib
if sys.version_info >= (3, 14):
from compression import zstd as zstandard
else:
import zstandard

try:
import brotli
Expand Down
9 changes: 8 additions & 1 deletion clickhouse_connect/driver/httputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,20 @@
import certifi
import lz4.frame
import urllib3
import zstandard

from urllib3.poolmanager import PoolManager, ProxyManager
from urllib3.response import HTTPResponse

from clickhouse_connect.driver.exceptions import ProgrammingError
from clickhouse_connect import common

# Python 3.14+ includes zstd in stdlib
if sys.version_info >= (3, 14):
from compression import zstd as zstandard
else:
import zstandard


logger = logging.getLogger(__name__)

# We disable this warning. Verify must be explicitly set to false, so we assume the user knows what they're doing
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ requires = ["setuptools", "cython==3.0.11"]

build-backend = "setuptools.build_meta"

[tool.cibuildwheel]
skip = "cp38-* pp38-*"

[tool.pytest.ini_options]
log_cli = true
log_cli_level = "INFO"
Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,21 @@ def run_setup(try_c: bool = True):
package_data={'clickhouse_connect': ['VERSION', 'py.typed']},
url='https://github.com/ClickHouse/clickhouse-connect',
packages=find_packages(exclude=['tests*']),
python_requires='>=3.9,<3.14',
python_requires='>=3.9,<3.15',
license='Apache License 2.0',
install_requires=[
'certifi',
'urllib3>=1.26',
'pytz',
'zstandard',
'zstandard; python_version<"3.14"',
'lz4'
],
extras_require={
'sqlalchemy': ['sqlalchemy>=1.4.40,<3.0'],
'numpy': ['numpy'],
'pandas': ['pandas'],
'polars': ['polars>=1.0'],
'arrow': ['pyarrow'],
'arrow': ['pyarrow>=22.0; python_version>="3.14"', 'pyarrow; python_version<"3.14"'],
'orjson': ['orjson'],
'tzlocal': ['tzlocal>=4.0'],
},
Expand All @@ -86,6 +86,7 @@ def run_setup(try_c: bool = True):
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
],
**kwargs
)
Expand Down
Loading