From 33c5959e231f0172f5355f1422f13def37275b65 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 4 Jul 2023 01:30:29 -0500 Subject: [PATCH] Remove from __future__ imports (#38703) --- bin/spack | 2 -- lib/spack/external/ctest_log_parser.py | 3 --- lib/spack/llnl/util/argparsewriter.py | 2 -- lib/spack/llnl/util/lang.py | 2 -- lib/spack/llnl/util/link_tree.py | 2 -- lib/spack/llnl/util/tty/__init__.py | 2 -- lib/spack/llnl/util/tty/colify.py | 2 -- lib/spack/llnl/util/tty/color.py | 2 -- lib/spack/llnl/util/tty/log.py | 2 -- lib/spack/llnl/util/tty/pty.py | 2 -- lib/spack/spack/cmd/__init__.py | 2 -- lib/spack/spack/cmd/arch.py | 2 -- lib/spack/spack/cmd/bootstrap.py | 2 -- lib/spack/spack/cmd/checksum.py | 2 -- lib/spack/spack/cmd/commands.py | 2 -- lib/spack/spack/cmd/common/env_utility.py | 2 -- lib/spack/spack/cmd/compiler.py | 2 -- lib/spack/spack/cmd/config.py | 2 -- lib/spack/spack/cmd/create.py | 2 -- lib/spack/spack/cmd/debug.py | 2 -- lib/spack/spack/cmd/deprecate.py | 2 -- lib/spack/spack/cmd/external.py | 2 -- lib/spack/spack/cmd/find.py | 2 -- lib/spack/spack/cmd/info.py | 2 -- lib/spack/spack/cmd/license.py | 2 -- lib/spack/spack/cmd/list.py | 2 -- lib/spack/spack/cmd/location.py | 2 -- lib/spack/spack/cmd/maintainers.py | 2 -- lib/spack/spack/cmd/mark.py | 2 -- lib/spack/spack/cmd/pkg.py | 2 -- lib/spack/spack/cmd/python.py | 2 -- lib/spack/spack/cmd/repo.py | 2 -- lib/spack/spack/cmd/resource.py | 2 -- lib/spack/spack/cmd/solve.py | 2 -- lib/spack/spack/cmd/spec.py | 2 -- lib/spack/spack/cmd/test.py | 2 -- lib/spack/spack/cmd/tutorial.py | 2 -- lib/spack/spack/cmd/uninstall.py | 2 -- lib/spack/spack/cmd/unit_test.py | 2 -- lib/spack/spack/cmd/url.py | 2 -- lib/spack/spack/cmd/verify.py | 2 -- lib/spack/spack/cmd/versions.py | 2 -- lib/spack/spack/concretize.py | 2 -- lib/spack/spack/error.py | 2 -- lib/spack/spack/main.py | 2 -- lib/spack/spack/modules/__init__.py | 2 -- lib/spack/spack/repo.py | 2 +- lib/spack/spack/solver/asp.py | 2 -- lib/spack/spack/stage.py | 2 -- lib/spack/spack/test/cmd/is_git_repo.py | 2 -- lib/spack/spack/test/cmd/maintainers.py | 2 -- lib/spack/spack/test/cmd/pkg.py | 2 -- lib/spack/spack/test/llnl/util/tty/log.py | 2 -- lib/spack/spack/test/spec_yaml.py | 2 -- lib/spack/spack/test/util/executable.py | 1 - lib/spack/spack/util/classes.py | 4 ---- lib/spack/spack/util/log_parse.py | 2 -- lib/spack/spack/util/naming.py | 3 --- lib/spack/spack/util/parallel.py | 2 -- lib/spack/spack/util/unparse/__init__.py | 3 --- lib/spack/spack/util/unparse/unparser.py | 2 -- lib/spack/spack/util/web.py | 2 -- 62 files changed, 1 insertion(+), 127 deletions(-) diff --git a/bin/spack b/bin/spack index fe90edf7d3d..a94faad09b1 100755 --- a/bin/spack +++ b/bin/spack @@ -25,8 +25,6 @@ exit 1 # Line above is a shell no-op, and ends a python multi-line comment. # The code above runs this file with our preferred python interpreter. -from __future__ import print_function - import os import os.path import sys diff --git a/lib/spack/external/ctest_log_parser.py b/lib/spack/external/ctest_log_parser.py index 0bb31e01b13..cc616f79057 100644 --- a/lib/spack/external/ctest_log_parser.py +++ b/lib/spack/external/ctest_log_parser.py @@ -65,9 +65,6 @@ up to date with CTest, just make sure the ``*_matches`` and ``*_exceptions`` lists are kept up to date with CTest's build handler. """ -from __future__ import print_function -from __future__ import division - import re import math import multiprocessing diff --git a/lib/spack/llnl/util/argparsewriter.py b/lib/spack/llnl/util/argparsewriter.py index 3a4f8b74894..d9aa4b471b5 100644 --- a/lib/spack/llnl/util/argparsewriter.py +++ b/lib/spack/llnl/util/argparsewriter.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import argparse import errno import io diff --git a/lib/spack/llnl/util/lang.py b/lib/spack/llnl/util/lang.py index 2f484cb8742..98cb283ed4e 100644 --- a/lib/spack/llnl/util/lang.py +++ b/lib/spack/llnl/util/lang.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import division - import collections.abc import contextlib import functools diff --git a/lib/spack/llnl/util/link_tree.py b/lib/spack/llnl/util/link_tree.py index dece1c5edfc..88c8b7d1a4a 100644 --- a/lib/spack/llnl/util/link_tree.py +++ b/lib/spack/llnl/util/link_tree.py @@ -5,8 +5,6 @@ """LinkTree class for setting up trees of symbolic links.""" -from __future__ import print_function - import filecmp import os import shutil diff --git a/lib/spack/llnl/util/tty/__init__.py b/lib/spack/llnl/util/tty/__init__.py index ba9a6275871..05e81ef615f 100644 --- a/lib/spack/llnl/util/tty/__init__.py +++ b/lib/spack/llnl/util/tty/__init__.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import unicode_literals - import contextlib import io import os diff --git a/lib/spack/llnl/util/tty/colify.py b/lib/spack/llnl/util/tty/colify.py index d22be2a2e1f..eb493aec332 100644 --- a/lib/spack/llnl/util/tty/colify.py +++ b/lib/spack/llnl/util/tty/colify.py @@ -6,8 +6,6 @@ """ Routines for printing columnar output. See ``colify()`` for more information. """ -from __future__ import division, unicode_literals - import io import os import sys diff --git a/lib/spack/llnl/util/tty/color.py b/lib/spack/llnl/util/tty/color.py index bfb6338798b..0f508f0d067 100644 --- a/lib/spack/llnl/util/tty/color.py +++ b/lib/spack/llnl/util/tty/color.py @@ -59,8 +59,6 @@ To output an @, use '@@'. To output a } inside braces, use '}}'. """ -from __future__ import unicode_literals - import re import sys from contextlib import contextmanager diff --git a/lib/spack/llnl/util/tty/log.py b/lib/spack/llnl/util/tty/log.py index f2aed3d5b9f..c325a8bf7db 100644 --- a/lib/spack/llnl/util/tty/log.py +++ b/lib/spack/llnl/util/tty/log.py @@ -5,8 +5,6 @@ """Utility classes for logging the output of blocks of code. """ -from __future__ import unicode_literals - import atexit import ctypes import errno diff --git a/lib/spack/llnl/util/tty/pty.py b/lib/spack/llnl/util/tty/pty.py index db959b3cff5..6f6433d3904 100644 --- a/lib/spack/llnl/util/tty/pty.py +++ b/lib/spack/llnl/util/tty/pty.py @@ -13,8 +13,6 @@ Note: The functionality in this module is unsupported on Windows """ -from __future__ import print_function - import multiprocessing import os import re diff --git a/lib/spack/spack/cmd/__init__.py b/lib/spack/spack/cmd/__init__.py index c8a8b3ee133..ed8c23e6c04 100644 --- a/lib/spack/spack/cmd/__init__.py +++ b/lib/spack/spack/cmd/__init__.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import argparse import os import re diff --git a/lib/spack/spack/cmd/arch.py b/lib/spack/spack/cmd/arch.py index ef91c0de363..b1845cf19d3 100644 --- a/lib/spack/spack/cmd/arch.py +++ b/lib/spack/spack/cmd/arch.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import collections import archspec.cpu diff --git a/lib/spack/spack/cmd/bootstrap.py b/lib/spack/spack/cmd/bootstrap.py index 6a8422297e7..be2e64dbce5 100644 --- a/lib/spack/spack/cmd/bootstrap.py +++ b/lib/spack/spack/cmd/bootstrap.py @@ -2,8 +2,6 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import os.path import shutil import tempfile diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py index efb27a410c8..c6b39132c85 100644 --- a/lib/spack/spack/cmd/checksum.py +++ b/lib/spack/spack/cmd/checksum.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import argparse import sys diff --git a/lib/spack/spack/cmd/commands.py b/lib/spack/spack/cmd/commands.py index d26d67bc32b..e48bb35f639 100644 --- a/lib/spack/spack/cmd/commands.py +++ b/lib/spack/spack/cmd/commands.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import argparse import copy import os diff --git a/lib/spack/spack/cmd/common/env_utility.py b/lib/spack/spack/cmd/common/env_utility.py index 095360ee04d..a616b79d8f1 100644 --- a/lib/spack/spack/cmd/common/env_utility.py +++ b/lib/spack/spack/cmd/common/env_utility.py @@ -2,8 +2,6 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import argparse import os diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index 4bb73e628ca..e16ab4d7f4c 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import argparse import sys diff --git a/lib/spack/spack/cmd/config.py b/lib/spack/spack/cmd/config.py index e9358582929..0d60970d3dc 100644 --- a/lib/spack/spack/cmd/config.py +++ b/lib/spack/spack/cmd/config.py @@ -2,8 +2,6 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import collections import os import shutil diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index 7d7444a9a02..7685320f4e8 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import os import re import urllib.parse diff --git a/lib/spack/spack/cmd/debug.py b/lib/spack/spack/cmd/debug.py index 8c3cb93d17b..b3224f0b1b9 100644 --- a/lib/spack/spack/cmd/debug.py +++ b/lib/spack/spack/cmd/debug.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import os import platform import re diff --git a/lib/spack/spack/cmd/deprecate.py b/lib/spack/spack/cmd/deprecate.py index 3f0994f564d..faecd910e74 100644 --- a/lib/spack/spack/cmd/deprecate.py +++ b/lib/spack/spack/cmd/deprecate.py @@ -13,8 +13,6 @@ It is up to the user to ensure binary compatibility between the deprecated installation and its deprecator. """ -from __future__ import print_function - import argparse import os diff --git a/lib/spack/spack/cmd/external.py b/lib/spack/spack/cmd/external.py index 6c794a70f2a..00e52b3b6e1 100644 --- a/lib/spack/spack/cmd/external.py +++ b/lib/spack/spack/cmd/external.py @@ -2,8 +2,6 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import argparse import errno import os diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index 4b4482fa5c1..f7bd56db190 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import copy import sys diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py index acca8d3a8ab..67e81d93a72 100644 --- a/lib/spack/spack/cmd/info.py +++ b/lib/spack/spack/cmd/info.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import textwrap from itertools import zip_longest diff --git a/lib/spack/spack/cmd/license.py b/lib/spack/spack/cmd/license.py index 454fefcecef..d39c98ad3f7 100644 --- a/lib/spack/spack/cmd/license.py +++ b/lib/spack/spack/cmd/license.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import os import re from collections import defaultdict diff --git a/lib/spack/spack/cmd/list.py b/lib/spack/spack/cmd/list.py index 4aa3dcf0b03..544bdda5ad2 100644 --- a/lib/spack/spack/cmd/list.py +++ b/lib/spack/spack/cmd/list.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import division, print_function - import argparse import fnmatch import json diff --git a/lib/spack/spack/cmd/location.py b/lib/spack/spack/cmd/location.py index 0afac01b0c1..48c0fd5d297 100644 --- a/lib/spack/spack/cmd/location.py +++ b/lib/spack/spack/cmd/location.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import os import llnl.util.tty as tty diff --git a/lib/spack/spack/cmd/maintainers.py b/lib/spack/spack/cmd/maintainers.py index b076aef2ec0..1fd61ef3824 100644 --- a/lib/spack/spack/cmd/maintainers.py +++ b/lib/spack/spack/cmd/maintainers.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import argparse from collections import defaultdict diff --git a/lib/spack/spack/cmd/mark.py b/lib/spack/spack/cmd/mark.py index 1d125cc409d..ca4f48096d5 100644 --- a/lib/spack/spack/cmd/mark.py +++ b/lib/spack/spack/cmd/mark.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import sys from llnl.util import tty diff --git a/lib/spack/spack/cmd/pkg.py b/lib/spack/spack/cmd/pkg.py index fad5d027b7f..1f1dcdb1818 100644 --- a/lib/spack/spack/cmd/pkg.py +++ b/lib/spack/spack/cmd/pkg.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import argparse import itertools import os diff --git a/lib/spack/spack/cmd/python.py b/lib/spack/spack/cmd/python.py index 3671d849042..2e7b490a637 100644 --- a/lib/spack/spack/cmd/python.py +++ b/lib/spack/spack/cmd/python.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import argparse import code import os diff --git a/lib/spack/spack/cmd/repo.py b/lib/spack/spack/cmd/repo.py index 5dd5e1677fb..f9fda6c066a 100644 --- a/lib/spack/spack/cmd/repo.py +++ b/lib/spack/spack/cmd/repo.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import os import sys diff --git a/lib/spack/spack/cmd/resource.py b/lib/spack/spack/cmd/resource.py index 96c0035c874..66b0c14f67e 100644 --- a/lib/spack/spack/cmd/resource.py +++ b/lib/spack/spack/cmd/resource.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import os import llnl.util.tty as tty diff --git a/lib/spack/spack/cmd/solve.py b/lib/spack/spack/cmd/solve.py index 3b58290f4f7..b20afd74e19 100644 --- a/lib/spack/spack/cmd/solve.py +++ b/lib/spack/spack/cmd/solve.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import argparse import re import sys diff --git a/lib/spack/spack/cmd/spec.py b/lib/spack/spack/cmd/spec.py index ab24e85c6fc..eef1888e7fd 100644 --- a/lib/spack/spack/cmd/spec.py +++ b/lib/spack/spack/cmd/spec.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import sys import llnl.util.lang as lang diff --git a/lib/spack/spack/cmd/test.py b/lib/spack/spack/cmd/test.py index 518cd70bbb8..732861acb2a 100644 --- a/lib/spack/spack/cmd/test.py +++ b/lib/spack/spack/cmd/test.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import argparse import fnmatch import os diff --git a/lib/spack/spack/cmd/tutorial.py b/lib/spack/spack/cmd/tutorial.py index 8db76895587..a07824f922a 100644 --- a/lib/spack/spack/cmd/tutorial.py +++ b/lib/spack/spack/cmd/tutorial.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import os.path import shutil diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 9b7a1742ff9..4607d1c5d5d 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import sys from typing import Dict, List, Optional diff --git a/lib/spack/spack/cmd/unit_test.py b/lib/spack/spack/cmd/unit_test.py index 3a875838d74..615f72bd8f2 100644 --- a/lib/spack/spack/cmd/unit_test.py +++ b/lib/spack/spack/cmd/unit_test.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import division, print_function - import argparse import collections import io diff --git a/lib/spack/spack/cmd/url.py b/lib/spack/spack/cmd/url.py index 86ffde231dd..ae221eb362b 100644 --- a/lib/spack/spack/cmd/url.py +++ b/lib/spack/spack/cmd/url.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import division, print_function - import urllib.parse from collections import defaultdict diff --git a/lib/spack/spack/cmd/verify.py b/lib/spack/spack/cmd/verify.py index 18a77ace929..026e025d363 100644 --- a/lib/spack/spack/cmd/verify.py +++ b/lib/spack/spack/cmd/verify.py @@ -2,8 +2,6 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import argparse import llnl.util.tty as tty diff --git a/lib/spack/spack/cmd/versions.py b/lib/spack/spack/cmd/versions.py index d9cb2a5f124..601e10b7e55 100644 --- a/lib/spack/spack/cmd/versions.py +++ b/lib/spack/spack/cmd/versions.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import sys import llnl.util.tty as tty diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 74eb6ea05db..a69404753b1 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -14,8 +14,6 @@ TODO: make this customizable and allow users to configure concretization policies. """ -from __future__ import print_function - import functools import platform import tempfile diff --git a/lib/spack/spack/error.py b/lib/spack/spack/error.py index 84417bfd6ff..0bf9b28be5f 100644 --- a/lib/spack/spack/error.py +++ b/lib/spack/spack/error.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import inspect import sys diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py index 2c64d5c8b3e..00131114f67 100644 --- a/lib/spack/spack/main.py +++ b/lib/spack/spack/main.py @@ -8,8 +8,6 @@ In a normal Spack installation, this is invoked from the bin/spack script after the system path is set up. """ -from __future__ import print_function - import argparse import inspect import io diff --git a/lib/spack/spack/modules/__init__.py b/lib/spack/spack/modules/__init__.py index e9049a43bb9..ccd800cdecd 100644 --- a/lib/spack/spack/modules/__init__.py +++ b/lib/spack/spack/modules/__init__.py @@ -7,8 +7,6 @@ include Tcl non-hierarchical modules, Lua hierarchical modules, and others. """ -from __future__ import absolute_import - from .common import disable_modules, ensure_modules_are_enabled_or_warn from .lmod import LmodModulefileWriter from .tcl import TclModulefileWriter diff --git a/lib/spack/spack/repo.py b/lib/spack/spack/repo.py index 4ae2e471c52..d3e376f6bfd 100644 --- a/lib/spack/spack/repo.py +++ b/lib/spack/spack/repo.py @@ -105,7 +105,7 @@ class RepoLoader(_PrependFileLoader): #: Spack packages are expected to call `from spack.package import *` #: themselves, but we are allowing a deprecation period before breaking #: external repos that don't do this yet. - _package_prepend = "from __future__ import absolute_import;" "from spack.package import *" + _package_prepend = "from spack.package import *" def __init__(self, fullname, repo, package_name): self.repo = repo diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index d8d058b7f06..2d77ba3cda8 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -2,8 +2,6 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import division, print_function - import collections import collections.abc import copy diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 97e05f365ed..f9f5d431b0d 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import errno import getpass import glob diff --git a/lib/spack/spack/test/cmd/is_git_repo.py b/lib/spack/spack/test/cmd/is_git_repo.py index a95e7ff91bb..3e1e7c287e2 100644 --- a/lib/spack/spack/test/cmd/is_git_repo.py +++ b/lib/spack/spack/test/cmd/is_git_repo.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import os import sys diff --git a/lib/spack/spack/test/cmd/maintainers.py b/lib/spack/spack/test/cmd/maintainers.py index 93b75da1678..3a80877c63c 100644 --- a/lib/spack/spack/test/cmd/maintainers.py +++ b/lib/spack/spack/test/cmd/maintainers.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import re import pytest diff --git a/lib/spack/spack/test/cmd/pkg.py b/lib/spack/spack/test/cmd/pkg.py index cd629913314..0820b1c0802 100644 --- a/lib/spack/spack/test/cmd/pkg.py +++ b/lib/spack/spack/test/cmd/pkg.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import re import shutil import sys diff --git a/lib/spack/spack/test/llnl/util/tty/log.py b/lib/spack/spack/test/llnl/util/tty/log.py index b5767d18623..5a26cd86d57 100644 --- a/lib/spack/spack/test/llnl/util/tty/log.py +++ b/lib/spack/spack/test/llnl/util/tty/log.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import contextlib import multiprocessing import os diff --git a/lib/spack/spack/test/spec_yaml.py b/lib/spack/spack/test/spec_yaml.py index b6c72ce76e0..594072ac4fe 100644 --- a/lib/spack/spack/test/spec_yaml.py +++ b/lib/spack/spack/test/spec_yaml.py @@ -8,8 +8,6 @@ The YAML and JSON formats preserve DAG information in the spec. """ -from __future__ import print_function - import ast import collections import collections.abc diff --git a/lib/spack/spack/test/util/executable.py b/lib/spack/spack/test/util/executable.py index c3d6cbbd17d..b4e4b4888ec 100644 --- a/lib/spack/spack/test/util/executable.py +++ b/lib/spack/spack/test/util/executable.py @@ -28,7 +28,6 @@ def test_read_unicode(tmpdir, working_env): with open(script_name, "w") as f: f.write( """#!{0} -from __future__ import print_function print(u'\\xc3') """.format( sys.executable diff --git a/lib/spack/spack/util/classes.py b/lib/spack/spack/util/classes.py index 8a7fb7d5943..05af353601b 100644 --- a/lib/spack/spack/util/classes.py +++ b/lib/spack/spack/util/classes.py @@ -2,10 +2,6 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - -# Need this because of spack.util.string -from __future__ import absolute_import - import inspect import llnl.util.tty as tty diff --git a/lib/spack/spack/util/log_parse.py b/lib/spack/spack/util/log_parse.py index df4f7ba68ba..bf88a9635ee 100644 --- a/lib/spack/spack/util/log_parse.py +++ b/lib/spack/spack/util/log_parse.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import io import sys diff --git a/lib/spack/spack/util/naming.py b/lib/spack/spack/util/naming.py index c5b3353aca2..c20aa780bc4 100644 --- a/lib/spack/spack/util/naming.py +++ b/lib/spack/spack/util/naming.py @@ -3,9 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -# Need this because of spack.util.string -from __future__ import absolute_import - import io import itertools import re diff --git a/lib/spack/spack/util/parallel.py b/lib/spack/spack/util/parallel.py index f2b216f74b5..1d7f52648ba 100644 --- a/lib/spack/spack/util/parallel.py +++ b/lib/spack/spack/util/parallel.py @@ -2,8 +2,6 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import contextlib import multiprocessing import os diff --git a/lib/spack/spack/util/unparse/__init__.py b/lib/spack/spack/util/unparse/__init__.py index 73f7d106c6f..c80554db18c 100644 --- a/lib/spack/spack/util/unparse/__init__.py +++ b/lib/spack/spack/util/unparse/__init__.py @@ -1,9 +1,6 @@ # Copyright (c) 2014-2021, Simon Percivall and Spack Project Developers. # # SPDX-License-Identifier: Python-2.0 -# coding: utf-8 -from __future__ import absolute_import - import io from .unparser import Unparser diff --git a/lib/spack/spack/util/unparse/unparser.py b/lib/spack/spack/util/unparse/unparser.py index 7ea247b69a8..75f61e53f90 100644 --- a/lib/spack/spack/util/unparse/unparser.py +++ b/lib/spack/spack/util/unparse/unparser.py @@ -2,8 +2,6 @@ # # SPDX-License-Identifier: Python-2.0 "Usage: unparse.py " -from __future__ import print_function, unicode_literals - import ast import sys from contextlib import contextmanager diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py index 7e627b31dda..874a1daf8da 100644 --- a/lib/spack/spack/util/web.py +++ b/lib/spack/spack/util/web.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from __future__ import print_function - import codecs import errno import multiprocessing.pool