From 4c5dc672d9ad6cbff320bdd3f5a0ae72fe295e87 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Mon, 25 Oct 2021 22:32:05 -0700 Subject: Deprecate Jerasure support It's been on its last legs ever since it got pulled from UTK and bitbucket. See also: the notice at http://web.eecs.utk.edu/~jplank/plank/www/software.html Change-Id: I28e050a52a2dcf738b1ce7edcfdc3fd78172d025 --- pyeclib/ec_iface.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pyeclib/ec_iface.py b/pyeclib/ec_iface.py index bd69861..fa50249 100644 --- a/pyeclib/ec_iface.py +++ b/pyeclib/ec_iface.py @@ -28,6 +28,8 @@ from .utils import create_instance from .utils import positive_int_value from pyeclib_c import get_liberasurecode_version +import warnings + import logging from logging.handlers import SysLogHandler logger = logging.getLogger('pyeclib') @@ -198,8 +200,15 @@ class ECDriver(object): value = "flat_xor_hd" elif value == "libphazr": self.hd = 1 + if PyECLib_EC_Types.has_enum(value): self.ec_type = PyECLib_EC_Types.get_by_name(value) + if self.ec_type in (PyECLib_EC_Types.jerasure_rs_vand, + PyECLib_EC_Types.jerasure_rs_cauchy): + warnings.warn('Jerasure support is deprecated and ' + 'may be removed in a future release', + FutureWarning, stacklevel=2) + else: raise ECBackendNotSupported( "%s is not a valid EC type for PyECLib!" % value) -- cgit v1.2.1