From be625c9c1d3a40b7f3a80a5ca08f638b4264df1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com> Date: Thu, 17 Nov 2022 10:03:43 +0100 Subject: [PATCH] MAINT: add deprecation warning --- src/caoscrawler/crawl.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py index 2538d118..9274145f 100644 --- a/src/caoscrawler/crawl.py +++ b/src/caoscrawler/crawl.py @@ -42,6 +42,7 @@ import argparse from argparse import RawTextHelpFormatter import caosdb as db from caosadvancedtools.crawler import Crawler as OldCrawler +import warnings from caosdb.common.datatype import is_reference from .stores import GeneralStore, RecordStore from .identified_cache import IdentifiedCache @@ -382,6 +383,12 @@ class Crawler(object): # More converters from definition file: if "Converters" in definition: for key, entry in definition["Converters"].items(): + if key in ["Dict", "DictTextElement", "DictIntegerElement", "DictBooleanElement", + "DictDictElement", "DictListElement", "DictFloatElement"]: + warnings.warn(DeprecationWarning(f"{key} is deprecated. Please use the new" + " variant; without 'Dict' prefix or " + "'DictElement' in case of 'Dict'")) + converter_registry[key] = { "converter": entry["converter"], "package": entry["package"] -- GitLab