diff options
author | Harmen Stoppels <me@harmenstoppels.nl> | 2024-04-19 14:33:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-19 14:33:42 +0200 |
commit | 74640987c7d80961d804b8603ffcce6711aa55a6 (patch) | |
tree | 7f21b15d1db2f27dc0cdda00797ac8fcf1f6990d /lib | |
parent | d6154645c72a6ee1c23a6eb24006fdf7a1dcce5d (diff) | |
download | spack-74640987c7d80961d804b8603ffcce6711aa55a6.tar.gz spack-74640987c7d80961d804b8603ffcce6711aa55a6.tar.bz2 spack-74640987c7d80961d804b8603ffcce6711aa55a6.tar.xz spack-74640987c7d80961d804b8603ffcce6711aa55a6.zip |
ruamel yaml: fix quadratic complexity bug (#43745)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/external/_vendoring/ruamel/yaml/comments.py | 2 | ||||
-rw-r--r-- | lib/spack/external/patches/ruamelyaml.patch | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/spack/external/_vendoring/ruamel/yaml/comments.py b/lib/spack/external/_vendoring/ruamel/yaml/comments.py index 892c868af3..1badeda585 100644 --- a/lib/spack/external/_vendoring/ruamel/yaml/comments.py +++ b/lib/spack/external/_vendoring/ruamel/yaml/comments.py @@ -497,7 +497,7 @@ class CommentedBase: Tag.attrib, merge_attrib]: if hasattr(self, a): if memo is not None: - setattr(t, a, copy.deepcopy(getattr(self, a, memo))) + setattr(t, a, copy.deepcopy(getattr(self, a), memo)) else: setattr(t, a, getattr(self, a)) # fmt: on diff --git a/lib/spack/external/patches/ruamelyaml.patch b/lib/spack/external/patches/ruamelyaml.patch new file mode 100644 index 0000000000..24bf17f233 --- /dev/null +++ b/lib/spack/external/patches/ruamelyaml.patch @@ -0,0 +1,13 @@ +diff --git a/lib/spack/external/_vendoring/ruamel/yaml/comments.py b/lib/spack/external/_vendoring/ruamel/yaml/comments.py +index 1badeda585..892c868af3 100644 +--- a/lib/spack/external/_vendoring/ruamel/yaml/comments.py ++++ b/lib/spack/external/_vendoring/ruamel/yaml/comments.py +@@ -497,7 +497,7 @@ def copy_attributes(self, t, memo=None): + Tag.attrib, merge_attrib]: + if hasattr(self, a): + if memo is not None: +- setattr(t, a, copy.deepcopy(getattr(self, a, memo))) ++ setattr(t, a, copy.deepcopy(getattr(self, a), memo)) + else: + setattr(t, a, getattr(self, a)) + # fmt: on |