From 8a4e7c5b99b532df2b015651d893a6f36288a22c Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev Date: Thu, 7 Nov 2024 18:14:28 +0300 Subject: [PATCH] Add warning on compression modules import --- clickhouse_driver/compression/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clickhouse_driver/compression/__init__.py b/clickhouse_driver/compression/__init__.py index ac19f51e..9b1ff287 100644 --- a/clickhouse_driver/compression/__init__.py +++ b/clickhouse_driver/compression/__init__.py @@ -1,8 +1,11 @@ import importlib +import logging from .. import errors from ..protocol import CompressionMethodByte +logger = logging.getLogger(__name__) + def get_compressor_cls(alg): try: @@ -10,6 +13,7 @@ def get_compressor_cls(alg): return module.Compressor except ImportError: + logger.warning('Unable to import module %s', alg, exc_info=True) raise errors.UnknownCompressionMethod( "Unknown compression method: '{}'".format(alg) )