From d1cf1b9e3b2853c0d353c582aff5f515ea2815ed Mon Sep 17 00:00:00 2001 From: "i.nueske" <i.nueske@indiscale.com> Date: Tue, 11 Mar 2025 15:21:41 +0100 Subject: [PATCH] MNT: Change warnings.warn to logger.warning to enable warning suppression, and add it to the module docstring --- src/linkahead/high_level_api.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/linkahead/high_level_api.py b/src/linkahead/high_level_api.py index 18d219c7..9aa59fb9 100644 --- a/src/linkahead/high_level_api.py +++ b/src/linkahead/high_level_api.py @@ -26,11 +26,12 @@ # type: ignore """ A high level API for accessing LinkAhead entities from within python. +This module is experimental, and may be changed or removed in the future. This is refactored from apiutils. """ -import warnings +import logging from dataclasses import dataclass, fields from datetime import datetime from typing import Any, Dict, List, Optional, Union @@ -44,7 +45,10 @@ from .common.datatype import (BOOLEAN, DATETIME, DOUBLE, FILE, INTEGER, REFERENCE, TEXT, get_list_datatype, is_list_datatype, is_reference) -warnings.warn("""EXPERIMENTAL! The high_level_api module is experimental and may be changed or +logger = logging.getLogger(__name__) + + +logger.warning("""EXPERIMENTAL! The high_level_api module is experimental and may be changed or removed in the future. Its purpose is to give an impression on how the Python client user interface might be changed.""") -- GitLab