From: Kyr Shatskyy Date: Wed, 17 Nov 2021 21:49:30 +0000 (+0100) Subject: teuthology/beanstalk: workaround yaml load deprecation X-Git-Tag: 1.2.0~220^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1697%2Fhead;p=teuthology.git teuthology/beanstalk: workaround yaml load deprecation There is a deprecation error when beanstalk parser called: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe Since beanstalkc3 does not want to apply a fix for that we can override yaml parser to suppress the error message from the log. Fixes: https://tracker.ceph.com/issues/44225 Signed-off-by: Kyr Shatskyy --- diff --git a/teuthology/beanstalk.py b/teuthology/beanstalk.py index a1165becc..ff3afb6ef 100644 --- a/teuthology/beanstalk.py +++ b/teuthology/beanstalk.py @@ -18,7 +18,7 @@ def connect(): raise RuntimeError( 'Beanstalk queue information not found in {conf_path}'.format( conf_path=config.teuthology_yaml)) - return beanstalkc.Connection(host=host, port=port) + return beanstalkc.Connection(host=host, port=port, parse_yaml=yaml.safe_load) def watch_tube(connection, tube_name):