diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2018-06-20 10:45:41 -0500 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2018-06-20 14:35:10 -0500 |
commit | 137456fbf3061877f9d6dca2c3a5ddb353128a82 (patch) | |
tree | 9416de990c59291465a5225d9b03d2a917ab2026 | |
parent | 508bbf407b199afb5e946ab27fd0b1746747e5fc (diff) | |
download | spack-137456fbf3061877f9d6dca2c3a5ddb353128a82.tar.gz spack-137456fbf3061877f9d6dca2c3a5ddb353128a82.tar.bz2 spack-137456fbf3061877f9d6dca2c3a5ddb353128a82.tar.xz spack-137456fbf3061877f9d6dca2c3a5ddb353128a82.zip |
externals: move spack.util.ordereddict to external/ordereddict_backport
-rw-r--r-- | lib/spack/external/_pytest/fixtures.py | 5 | ||||
-rw-r--r-- | lib/spack/external/ordereddict_backport.py (renamed from lib/spack/spack/util/ordereddict.py) | 0 | ||||
-rw-r--r-- | lib/spack/spack/config.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/test/conftest.py | 4 | ||||
-rw-r--r-- | lib/spack/spack/util/spack_yaml.py | 2 |
5 files changed, 5 insertions, 8 deletions
diff --git a/lib/spack/external/_pytest/fixtures.py b/lib/spack/external/_pytest/fixtures.py index b76ad50339..98317a4889 100644 --- a/lib/spack/external/_pytest/fixtures.py +++ b/lib/spack/external/_pytest/fixtures.py @@ -21,10 +21,7 @@ from _pytest.compat import ( from _pytest.outcomes import fail, TEST_OUTCOME -if sys.version_info[:2] == (2, 6): - from ordereddict import OrderedDict -else: - from collections import OrderedDict # nopyqver +from ordereddict_backport import OrderedDict def pytest_sessionstart(session): diff --git a/lib/spack/spack/util/ordereddict.py b/lib/spack/external/ordereddict_backport.py index bd21103cdc..bd21103cdc 100644 --- a/lib/spack/spack/util/ordereddict.py +++ b/lib/spack/external/ordereddict_backport.py diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 73738c9ed3..d54dd74d5a 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -57,6 +57,7 @@ import multiprocessing from contextlib import contextmanager from six import string_types from six import iteritems +from ordereddict_backport import OrderedDict import yaml from yaml.error import MarkedYAMLError @@ -69,7 +70,6 @@ import spack.paths import spack.architecture import spack.schema from spack.error import SpackError -from spack.util.ordereddict import OrderedDict # Hacked yaml for configuration files preserves line numbers. import spack.util.spack_yaml as syaml diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index 1072513c3c..d1f96451d4 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -28,6 +28,7 @@ import os import shutil import re +import ordereddict_backport import py import pytest @@ -42,7 +43,6 @@ import spack.paths import spack.platforms.test import spack.repo import spack.stage -import spack.util.ordereddict import spack.util.executable import spack.util.pattern from spack.dependency import Dependency @@ -603,7 +603,7 @@ class MockPackage(object): versions=None): self.name = name self.spec = None - self.dependencies = spack.util.ordereddict.OrderedDict() + self.dependencies = ordereddict_backport.OrderedDict() assert len(dependencies) == len(dependency_types) for dep, dtype in zip(dependencies, dependency_types): diff --git a/lib/spack/spack/util/spack_yaml.py b/lib/spack/spack/util/spack_yaml.py index f7adadb980..c02f6c9d04 100644 --- a/lib/spack/spack/util/spack_yaml.py +++ b/lib/spack/spack/util/spack_yaml.py @@ -31,6 +31,7 @@ default unorderd dict. """ +from ordereddict_backport import OrderedDict from six import string_types, StringIO import yaml @@ -41,7 +42,6 @@ from yaml.constructor import ConstructorError from llnl.util.tty.color import colorize, clen, cextra import spack.error -from spack.util.ordereddict import OrderedDict # Only export load and dump __all__ = ['load', 'dump', 'SpackYAMLError'] |