From 48a1c305c1ad3094e3e122a9d86f257a1ba9c2e0 Mon Sep 17 00:00:00 2001 From: Drew Date: Tue, 9 Feb 2021 16:42:39 -0500 Subject: [PATCH] master: fix DeprecationWarning on logger.warn Resolves error message shown. The following error message is shown when worker_impl.py:199 is run: ``` WARNING:worker(RID,EXPERIMENT):py.warnings:/nix/store/77sw4p03cb7rdayx86agi4yqxh5wq46b-python3.7-artiq-5.7141.1b68906/lib/python3.7/site-packages/artiq/master/worker_impl.py:199: DeprecationWarning: The 'warn' function is deprecated, use 'warning' instead logging.warn(message) ``` --- artiq/master/worker_impl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/master/worker_impl.py b/artiq/master/worker_impl.py index 784e4297a..cd575d214 100644 --- a/artiq/master/worker_impl.py +++ b/artiq/master/worker_impl.py @@ -196,7 +196,7 @@ def setup_diagnostics(experiment_file, repository_path): message = message.replace(repository_path, "") if diagnostic.level == "warning": - logging.warn(message) + logging.warning(message) else: logging.error(message)