From e1abfd62bee7929540709f2159fe731e994723ca Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Tue, 6 Aug 2024 14:53:33 +0300 Subject: [PATCH] Don't use strtobool from distutils --- Dockerfile | 1 - Dockerfile-dev | 1 - soda/core/soda/telemetry/soda_telemetry.py | 5 ++--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6d6b31d4e..21284930a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,6 @@ RUN apt-get update && \ libpq-dev \ libssl-dev libffi-dev \ python3.9 python3.9-dev python3.9-venv libpython3.9-dev libpython3.9 \ - python3.9-distutils \ unixodbc-dev git lsb-release \ alien odbcinst diff --git a/Dockerfile-dev b/Dockerfile-dev index e66a97483..1a11c17ce 100644 --- a/Dockerfile-dev +++ b/Dockerfile-dev @@ -19,7 +19,6 @@ RUN apt-get update && \ libsasl2-dev \ libssl-dev libffi-dev \ python3.9 python3.9-dev python3.9-venv libpython3.9-dev libpython3.9 \ - python3.9-distutils \ unixodbc-dev git && \ apt-get clean -qq -y && \ apt-get autoclean -qq -y && \ diff --git a/soda/core/soda/telemetry/soda_telemetry.py b/soda/core/soda/telemetry/soda_telemetry.py index e1ad927b4..fac53227f 100644 --- a/soda/core/soda/telemetry/soda_telemetry.py +++ b/soda/core/soda/telemetry/soda_telemetry.py @@ -1,7 +1,6 @@ import logging import os import platform -from distutils.util import strtobool from typing import Dict from opentelemetry import trace @@ -85,8 +84,8 @@ def __init__(self, test_mode: bool): def __setup(self): """Set up Open Telemetry processors and exporters for normal use.""" - local_debug_mode = self.soda_config.get_value("telemetry_local_debug_mode") or bool( - strtobool(os.getenv("telemetry_local_debug_mode", "false")) + local_debug_mode = self.soda_config.get_value("telemetry_local_debug_mode") or ( + os.getenv("telemetry_local_debug_mode", "false").lower() in ("y", "yes", "t", "true", "on", "1") ) if local_debug_mode or logger.getEffectiveLevel() == logging.DEBUG: