From a009a1a62ad44ecb095b8b44c9b85aaf0e904ade Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 12 Sep 2023 11:27:03 +0200 Subject: [PATCH] asp.py: fix deprecation warning (#39943) --- lib/spack/spack/solver/asp.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index 7b13b4baa3..6ddca741ce 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -2730,9 +2730,8 @@ def reorder_flags(self): spec.compiler_flags.update({flag_type: ordered_compiler_flags}) - def deprecated(self, pkg, version): - msg = 'using "{0}@{1}" which is a deprecated version' - tty.warn(msg.format(pkg, version)) + def deprecated(self, node: NodeArgument, version: str) -> None: + tty.warn(f'using "{node.pkg}@{version}" which is a deprecated version') @staticmethod def sort_fn(function_tuple):