summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2024-08-27 18:45:44 +0200
committerGitHub <noreply@github.com>2024-08-27 18:45:44 +0200
commit9d8f94a7c83ee465c12f1e2216dec08ee979bc2c (patch)
tree77d8658f351c2a1b229d46ae4913ae70d627cb3e
parent1297673a7030aa3dd683c90774fd0f066f821ab1 (diff)
downloadspack-9d8f94a7c83ee465c12f1e2216dec08ee979bc2c.tar.gz
spack-9d8f94a7c83ee465c12f1e2216dec08ee979bc2c.tar.bz2
spack-9d8f94a7c83ee465c12f1e2216dec08ee979bc2c.tar.xz
spack-9d8f94a7c83ee465c12f1e2216dec08ee979bc2c.zip
spack_yaml: delete custom deepcopy (#46048)
-rw-r--r--lib/spack/spack/util/spack_yaml.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/spack/spack/util/spack_yaml.py b/lib/spack/spack/util/spack_yaml.py
index b3326d2959..d53f26350e 100644
--- a/lib/spack/spack/util/spack_yaml.py
+++ b/lib/spack/spack/util/spack_yaml.py
@@ -14,7 +14,6 @@
"""
import collections
import collections.abc
-import copy
import ctypes
import enum
import functools
@@ -400,20 +399,6 @@ class ConfigYAML:
return result.getvalue()
-def deepcopy(data):
- """Returns a deepcopy of the input YAML data."""
- result = copy.deepcopy(data)
-
- if isinstance(result, comments.CommentedMap):
- # HACK to fully copy ruamel CommentedMap that doesn't provide copy
- # method. Especially necessary for environments
- extracted_comments = extract_comments(data)
- if extracted_comments:
- set_comments(result, data_comments=extracted_comments)
-
- return result
-
-
def load_config(str_or_file):
"""Load but modify the loader instance so that it will add __line__
attributes to the returned object."""