From ee62d72bad4b5c854e29837ba24382ce0432d7c9 Mon Sep 17 00:00:00 2001 From: Bastian Krause Date: Mon, 30 Sep 2024 13:47:22 +0200 Subject: [PATCH] labgrid/driver/power: deprecate siglent backend See https://github.com/labgrid-project/labgrid/issues/1507 for more details. Signed-off-by: Bastian Krause --- CHANGES.rst | 5 ++++- labgrid/driver/power/siglent.py | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index b2c4ce84c..07a258019 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -42,7 +42,10 @@ Due to the migration, 24.1 includes the following breaking changes: Other breaking changes include: -FIXME +- The siglent power backend is deprecated because it uses the no longer + maintained vxi11 module which again uses the deprecated (and in Python 3.13 + removed) xdrlib. See + `issue #1507 `_. Known issues in 24.1 ~~~~~~~~~~~~~~~~~~~~ diff --git a/labgrid/driver/power/siglent.py b/labgrid/driver/power/siglent.py index bf92ee16d..d06e7725e 100644 --- a/labgrid/driver/power/siglent.py +++ b/labgrid/driver/power/siglent.py @@ -1,9 +1,16 @@ """ tested with Siglent SPD3303X-E, and should be compatible with all SPD3000X series modules""" +import warnings + import vxi11 def power_set(host, port, index, value): + warnings.warn( + "siglent power backend uses vxi11 module using deprecated xdrlib module, see https://github.com/labgrid-project/labgrid/issues/1507", + DeprecationWarning, + ) + assert port is None index = int(index) assert 1 <= index <= 2 @@ -13,6 +20,11 @@ def power_set(host, port, index, value): def power_get(host, port, index): + warnings.warn( + "siglent power backend uses vxi11 module using deprecated xdrlib module, see https://github.com/labgrid-project/labgrid/issues/1507", + DeprecationWarning, + ) + assert port is None index = int(index) assert 1 <= index <= 2