summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/parse.py2
-rw-r--r--lib/spack/spack/test/cmd/release_jobs.py8
-rw-r--r--lib/spack/spack/test/spec_syntax.py2
-rw-r--r--lib/spack/spack/util/editor.py2
-rw-r--r--lib/spack/spack/util/executable.py2
5 files changed, 4 insertions, 12 deletions
diff --git a/lib/spack/spack/parse.py b/lib/spack/spack/parse.py
index b5cf366dc0..836b40c3a6 100644
--- a/lib/spack/spack/parse.py
+++ b/lib/spack/spack/parse.py
@@ -143,7 +143,7 @@ class Parser(object):
def setup(self, text):
if isinstance(text, string_types):
- text = shlex.split(text)
+ text = shlex.split(str(text))
self.text = text
self.push_tokens(self.lexer.lex(text))
diff --git a/lib/spack/spack/test/cmd/release_jobs.py b/lib/spack/spack/test/cmd/release_jobs.py
index 512650723c..7768b7d8c1 100644
--- a/lib/spack/spack/test/cmd/release_jobs.py
+++ b/lib/spack/spack/test/cmd/release_jobs.py
@@ -3,10 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import pytest
-
import json
-import sys
from jsonschema import validate
@@ -39,11 +36,6 @@ def test_specs_deps(tmpdir, config):
validate(deps_object, specs_deps_schema)
-@pytest.mark.skipif(
- sys.version_info[:2] < (2, 7),
- reason="For some reason in Python2.6 we get a utf-32 string "
- "that can't be parsed"
-)
def test_specs_staging(config):
"""Make sure we achieve the best possible staging for the following
spec DAG::
diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py
index 9437cb31fa..699ecc987c 100644
--- a/lib/spack/spack/test/spec_syntax.py
+++ b/lib/spack/spack/test/spec_syntax.py
@@ -97,7 +97,7 @@ class TestSpecSyntax(object):
def check_lex(self, tokens, spec):
"""Check that the provided spec parses to the provided token list."""
- spec = shlex.split(spec)
+ spec = shlex.split(str(spec))
lex_output = sp.SpecLexer().lex(spec)
for tok, spec_tok in zip(tokens, lex_output):
if tok.type == sp.ID or tok.type == sp.VAL:
diff --git a/lib/spack/spack/util/editor.py b/lib/spack/spack/util/editor.py
index 22db247c6a..ce5010d99f 100644
--- a/lib/spack/spack/util/editor.py
+++ b/lib/spack/spack/util/editor.py
@@ -41,7 +41,7 @@ def _find_exe_from_env_var(var):
return None, []
# split env var into executable and args if needed
- args = shlex.split(exe)
+ args = shlex.split(str(exe))
if not args:
return None, []
diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py
index de18d24922..e383a533af 100644
--- a/lib/spack/spack/util/executable.py
+++ b/lib/spack/spack/util/executable.py
@@ -20,7 +20,7 @@ class Executable(object):
"""Class representing a program that can be run on the command line."""
def __init__(self, name):
- self.exe = shlex.split(name)
+ self.exe = shlex.split(str(name))
self.default_env = {}
self.returncode = None