From ecf16ac035e8604cde0b0ec2c15fbce3d47735d2 Mon Sep 17 00:00:00 2001 From: Daniel <d.hornung@indiscale.com> Date: Mon, 14 Mar 2022 13:04:48 +0100 Subject: [PATCH] MAINT: Deprecating components which are to be replaced. --- src/caosdb/apiutils.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/caosdb/apiutils.py b/src/caosdb/apiutils.py index a8256976..dc9209b5 100644 --- a/src/caosdb/apiutils.py +++ b/src/caosdb/apiutils.py @@ -141,6 +141,9 @@ class CaosDBPythonEntity(object): _last_id = 0 def __init__(self): + warnings.warn("The CaosDBPythonEntity class is deprecated, replacements will be provided by" + " the high_level_api module.", + DeprecationWarning, stacklevel=2) # Save a copy of the dry state # of this object in order to be # able to detect conflicts. @@ -469,6 +472,9 @@ def _single_convert_to_entity(entity, robj, **kwargs): def convert_to_entity(python_object, **kwargs): + warnings.warn("The convert_to_entity function is deprecated, replacement will be provided by " + "the high_level_api module.", DeprecationWarning, stacklevel=2) + if isinstance(python_object, Container): # Create a list of objects: @@ -490,6 +496,8 @@ def convert_to_entity(python_object, **kwargs): def convert_to_python_object(entity): """""" + warnings.warn("The convert_to_python_object function is deprecated, replacement will be " + "provided by the high_level_api module.", DeprecationWarning, stacklevel=2) if isinstance(entity, Container): # Create a list of objects: -- GitLab