From deabd1ce7982e4ec5d0d4ee22fd579b73e84f584 Mon Sep 17 00:00:00 2001 From: Geoff Genz Date: Tue, 2 Apr 2024 00:00:06 -0600 Subject: [PATCH] Upgrade setuptools requirement for clickhouse_driver install --- dbt/adapters/clickhouse/__version__.py | 2 +- dbt/adapters/clickhouse/dbclient.py | 8 ++++---- dev_requirements.txt | 4 ++-- setup.py | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dbt/adapters/clickhouse/__version__.py b/dbt/adapters/clickhouse/__version__.py index 86d86eea..ee8593ed 100644 --- a/dbt/adapters/clickhouse/__version__.py +++ b/dbt/adapters/clickhouse/__version__.py @@ -1 +1 @@ -version = '1.7.4' +version = '1.7.5' diff --git a/dbt/adapters/clickhouse/dbclient.py b/dbt/adapters/clickhouse/dbclient.py index 31037f36..7bb78785 100644 --- a/dbt/adapters/clickhouse/dbclient.py +++ b/dbt/adapters/clickhouse/dbclient.py @@ -53,20 +53,20 @@ def get_db_client(credentials: ClickHouseCredentials): from dbt.adapters.clickhouse.nativeclient import ChNativeClient return ChNativeClient(credentials) - except ImportError: + except ImportError as ex: raise FailedToConnectError( 'Native adapter required but package clickhouse-driver is not installed' - ) + ) from ex try: import clickhouse_connect # noqa from dbt.adapters.clickhouse.httpclient import ChHttpClient return ChHttpClient(credentials) - except ImportError: + except ImportError as ex: raise FailedToConnectError( 'HTTP adapter required but package clickhouse-connect is not installed' - ) + ) from ex class ChRetryableException(Exception): diff --git a/dev_requirements.txt b/dev_requirements.txt index b81f8a92..cc3feb46 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -12,5 +12,5 @@ flake8==4.0.1 types-requests==2.27.29 agate~=1.7.1 requests~=2.27.1 -setuptools~=65.3.0 -types-setuptools==67.1.0.0 \ No newline at end of file +setuptools>=69.2.0 +types-setuptools>=69.2.0 \ No newline at end of file diff --git a/setup.py b/setup.py index 7beb9ba9..b5f27dbd 100644 --- a/setup.py +++ b/setup.py @@ -57,6 +57,7 @@ def _dbt_clickhouse_version(): f'dbt-core~={dbt_version}', 'clickhouse-connect>=0.6.22', 'clickhouse-driver>=0.2.6', + 'setuptools>=0.69' ], python_requires=">=3.8", platforms='any',