From cf3addc69e898bb7c48611d36388fddc2b0708cb Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 11 Dec 2024 10:58:19 -0800 Subject: [PATCH] attach methods to correct class --- lib/spack/spack/spec.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 700ae569368..cd6ccd5e746 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -551,18 +551,6 @@ def concrete(self): """True if the spec is concrete, False otherwise""" return self.platform and self.os and self.target and self.target_concrete - def concretize(self, tests: Union[bool, Iterable[str]] = False) -> None: - self._dup(self.concretized(tests=tests)) - - def concretized(self, tests: Union[bool, Iterable[str]] = False) -> "spack.spec.Spec": - import spack.concretize - - msg = "`Spec.concretize` and `Spec.concretized` methods are deprecated and will be " - msg += "removed in version 1.0.0. Use `spack.concretize.concretized` instead." - tty.warn(msg) - - return spack.concretize.concretized(self) - @property def target_concrete(self): """True if the target is not a range or list.""" @@ -1911,6 +1899,18 @@ def concrete(self): """ return self._concrete + def concretize(self, tests: Union[bool, Iterable[str]] = False) -> None: + self._dup(self.concretized(tests=tests)) + + def concretized(self, tests: Union[bool, Iterable[str]] = False) -> "spack.spec.Spec": + import spack.concretize + + msg = "`Spec.concretize` and `Spec.concretized` methods are deprecated and will be " + msg += "removed in version 1.0.0. Use `spack.concretize.concretized` instead." + tty.warn(msg) + + return spack.concretize.concretized(self) + @property def spliced(self): """Returns whether or not this Spec is being deployed as built i.e.