diff --git a/.ycm_extra_conf.py b/.ycm_extra_conf.py
index 26b584e90532..46e1387ec9fb 100644
--- a/.ycm_extra_conf.py
+++ b/.ycm_extra_conf.py
@@ -2,7 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
import json
import os
import shlex
diff --git a/accessible/mac/SelectorMapGen.py b/accessible/mac/SelectorMapGen.py
index 68074c8490b9..1e406ade1f63 100755
--- a/accessible/mac/SelectorMapGen.py
+++ b/accessible/mac/SelectorMapGen.py
@@ -4,8 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import re
diff --git a/accessible/xpcom/AccEventGen.py b/accessible/xpcom/AccEventGen.py
index 311c53ff8f0a..791b57827da6 100755
--- a/accessible/xpcom/AccEventGen.py
+++ b/accessible/xpcom/AccEventGen.py
@@ -4,8 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import os
import buildconfig
diff --git a/browser/app/macversion.py b/browser/app/macversion.py
index b6a21bc45743..878fb096403a 100644
--- a/browser/app/macversion.py
+++ b/browser/app/macversion.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import io
import re
import sys
diff --git a/browser/app/winlauncher/freestanding/gen_ntdll_freestanding_lib.py b/browser/app/winlauncher/freestanding/gen_ntdll_freestanding_lib.py
index a69261cc3ae3..d9fe86d78e62 100644
--- a/browser/app/winlauncher/freestanding/gen_ntdll_freestanding_lib.py
+++ b/browser/app/winlauncher/freestanding/gen_ntdll_freestanding_lib.py
@@ -4,8 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import os
import subprocess
import tempfile
diff --git a/browser/components/migration/tests/marionette/test_refresh_firefox.py b/browser/components/migration/tests/marionette/test_refresh_firefox.py
index 423017509097..3ce4f52192ee 100644
--- a/browser/components/migration/tests/marionette/test_refresh_firefox.py
+++ b/browser/components/migration/tests/marionette/test_refresh_firefox.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, print_function
-
import os
import time
diff --git a/browser/components/search/test/marionette/test_engines_on_restart.py b/browser/components/search/test/marionette/test_engines_on_restart.py
index 496e2ed913cf..d7a0634e7589 100644
--- a/browser/components/search/test/marionette/test_engines_on_restart.py
+++ b/browser/components/search/test/marionette/test_engines_on_restart.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import textwrap
from marionette_harness.marionette_test import MarionetteTestCase
diff --git a/browser/components/sessionstore/test/marionette/session_store_test_case.py b/browser/components/sessionstore/test/marionette/session_store_test_case.py
index 7aa2fab9820e..315adc5c4733 100644
--- a/browser/components/sessionstore/test/marionette/session_store_test_case.py
+++ b/browser/components/sessionstore/test/marionette/session_store_test_case.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
from urllib.parse import quote
from marionette_driver import Wait, errors
diff --git a/browser/components/sessionstore/test/marionette/test_restore_windows_after_close_last_tabs.py b/browser/components/sessionstore/test/marionette/test_restore_windows_after_close_last_tabs.py
index 0362070f0635..2022d8fb8741 100644
--- a/browser/components/sessionstore/test/marionette/test_restore_windows_after_close_last_tabs.py
+++ b/browser/components/sessionstore/test/marionette/test_restore_windows_after_close_last_tabs.py
@@ -3,8 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# add this directory to the path
-from __future__ import absolute_import
-
import os
import sys
diff --git a/browser/components/sessionstore/test/marionette/test_restore_windows_after_restart_and_quit.py b/browser/components/sessionstore/test/marionette/test_restore_windows_after_restart_and_quit.py
index b4e52db701db..be17f08472b7 100644
--- a/browser/components/sessionstore/test/marionette/test_restore_windows_after_restart_and_quit.py
+++ b/browser/components/sessionstore/test/marionette/test_restore_windows_after_restart_and_quit.py
@@ -3,8 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# add this directory to the path
-from __future__ import absolute_import
-
import os
import sys
diff --git a/browser/components/sessionstore/test/marionette/test_restore_windows_after_windows_shutdown.py b/browser/components/sessionstore/test/marionette/test_restore_windows_after_windows_shutdown.py
index 8f8e0d512cd6..21eec455bbd5 100644
--- a/browser/components/sessionstore/test/marionette/test_restore_windows_after_windows_shutdown.py
+++ b/browser/components/sessionstore/test/marionette/test_restore_windows_after_windows_shutdown.py
@@ -3,8 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# add this directory to the path
-from __future__ import absolute_import
-
import os
import sys
diff --git a/browser/components/shell/test/mac_desktop_image.py b/browser/components/shell/test/mac_desktop_image.py
index bdf2e842e639..e3ccc77190b9 100755
--- a/browser/components/shell/test/mac_desktop_image.py
+++ b/browser/components/shell/test/mac_desktop_image.py
@@ -15,8 +15,6 @@ paths by default when using macOS's /usr/bin/python.
Includes generous amount of logging to aid debugging for use in automated tests.
"""
-from __future__ import absolute_import, print_function
-
import argparse
import logging
import os
diff --git a/browser/locales/filter.py b/browser/locales/filter.py
index 523dd50e29b3..9155947e436a 100644
--- a/browser/locales/filter.py
+++ b/browser/locales/filter.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
def test(mod, path, entity=None):
# ignore anything but Firefox
diff --git a/browser/locales/generate_ini.py b/browser/locales/generate_ini.py
index 6ae800f2764c..ed936d8428a4 100644
--- a/browser/locales/generate_ini.py
+++ b/browser/locales/generate_ini.py
@@ -5,8 +5,6 @@
# Generate updater.ini by doing some light substitution on the localized updater.ini input,
# and appending the contents of updater_ini_append on Windows.
-from __future__ import absolute_import, print_function, unicode_literals
-
import codecs
import re
import shutil
diff --git a/build/RunCbindgen.py b/build/RunCbindgen.py
index a42a6a435c61..f797cad385d7 100644
--- a/build/RunCbindgen.py
+++ b/build/RunCbindgen.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
import os
import subprocess
diff --git a/build/build-clang/build-clang.py b/build/build-clang/build-clang.py
index f186078c2a87..5345b0a3cb20 100755
--- a/build/build-clang/build-clang.py
+++ b/build/build-clang/build-clang.py
@@ -4,8 +4,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Only necessary for flake8 to be happy...
-from __future__ import print_function
-
import argparse
import errno
import fnmatch
diff --git a/build/checksums.py b/build/checksums.py
index 970e44d80323..1a393b4a6d97 100755
--- a/build/checksums.py
+++ b/build/checksums.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import with_statement
-
import hashlib
import logging
import os
diff --git a/build/compare-mozconfig/compare-mozconfigs.py b/build/compare-mozconfig/compare-mozconfigs.py
index 7a46d61d7623..210fd0568e5a 100644
--- a/build/compare-mozconfig/compare-mozconfigs.py
+++ b/build/compare-mozconfig/compare-mozconfigs.py
@@ -5,8 +5,6 @@
# originally from https://hg.mozilla.org/build/tools/file/4ab9c1a4e05b/scripts/release/compare-mozconfigs.py # NOQA: E501
-from __future__ import unicode_literals
-
import difflib
import logging
import os
diff --git a/build/mach_initialize.py b/build/mach_initialize.py
index 8842bf92a4b8..d6f054a3d212 100644
--- a/build/mach_initialize.py
+++ b/build/mach_initialize.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import division, print_function, unicode_literals
-
import math
import os
import shutil
diff --git a/build/upload_generated_sources.py b/build/upload_generated_sources.py
index abfef92e3cec..accce4beb9dd 100644
--- a/build/upload_generated_sources.py
+++ b/build/upload_generated_sources.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import argparse
import gzip
import io
diff --git a/build/valgrind/mach_commands.py b/build/valgrind/mach_commands.py
index c3b8eab49db6..2b6fa79ce07b 100644
--- a/build/valgrind/mach_commands.py
+++ b/build/valgrind/mach_commands.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, unicode_literals
-
import json
import logging
import os
diff --git a/build/valgrind/output_handler.py b/build/valgrind/output_handler.py
index d3a84d344434..613f7f8c1fb8 100644
--- a/build/valgrind/output_handler.py
+++ b/build/valgrind/output_handler.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function, unicode_literals
-
import logging
import re
diff --git a/build/variables.py b/build/variables.py
index ef2d6e6800f3..357e05c37bf5 100644
--- a/build/variables.py
+++ b/build/variables.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function, unicode_literals
-
import os
import subprocess
import sys
diff --git a/client.py b/client.py
index f092a6c92aac..ea16f95627c9 100755
--- a/client.py
+++ b/client.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
HG_EXCLUSIONS = [".hg", ".hgignore", ".hgtags"]
import glob
diff --git a/config/MozZipFile.py b/config/MozZipFile.py
index 2d3ff00ced32..6e74bc1eba25 100644
--- a/config/MozZipFile.py
+++ b/config/MozZipFile.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import time
import zipfile
diff --git a/config/check_js_msg_encoding.py b/config/check_js_msg_encoding.py
index 56077ee2cf04..6543405f9044 100644
--- a/config/check_js_msg_encoding.py
+++ b/config/check_js_msg_encoding.py
@@ -9,8 +9,6 @@
# JSErrorFormatString.format member should be in ASCII encoding.
# ----------------------------------------------------------------------------
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import sys
diff --git a/config/check_js_opcode.py b/config/check_js_opcode.py
index 2f24061beec6..b6a6c1f1c834 100644
--- a/config/check_js_opcode.py
+++ b/config/check_js_opcode.py
@@ -7,8 +7,6 @@
# This script checks bytecode documentation in js/src/vm/Opcodes.h
# ----------------------------------------------------------------------------
-from __future__ import absolute_import, print_function
-
import os
import sys
diff --git a/config/check_macroassembler_style.py b/config/check_macroassembler_style.py
index bfe28c0d8d61..02a1cdfe3212 100644
--- a/config/check_macroassembler_style.py
+++ b/config/check_macroassembler_style.py
@@ -20,8 +20,6 @@
# proper methods annotations.
# ----------------------------------------------------------------------------
-from __future__ import absolute_import, print_function
-
import difflib
import os
import re
diff --git a/config/check_source_count.py b/config/check_source_count.py
index c465f6749a20..a0a3f2c6d4f7 100755
--- a/config/check_source_count.py
+++ b/config/check_source_count.py
@@ -9,8 +9,6 @@
# not, an error message is printed, quoting ERROR_LOCATION, which should
# probably be the filename and line number of the erroneous call to
# check_source_count.py.
-from __future__ import absolute_import, print_function
-
import re
import sys
diff --git a/config/check_spidermonkey_style.py b/config/check_spidermonkey_style.py
index 21d48fe223ec..3ad27cbe8832 100644
--- a/config/check_spidermonkey_style.py
+++ b/config/check_spidermonkey_style.py
@@ -35,8 +35,6 @@
# isolation, but don't try to do any order checking between such blocks.
# ----------------------------------------------------------------------------
-from __future__ import absolute_import, print_function
-
import difflib
import os
import re
diff --git a/config/check_vanilla_allocations.py b/config/check_vanilla_allocations.py
index 8fbef54a1584..76ba122c1177 100644
--- a/config/check_vanilla_allocations.py
+++ b/config/check_vanilla_allocations.py
@@ -38,8 +38,6 @@
# mismatched alloc/free checking.
# ----------------------------------------------------------------------------
-from __future__ import absolute_import, print_function, unicode_literals
-
import argparse
import re
import subprocess
diff --git a/config/createprecomplete.py b/config/createprecomplete.py
index 7a442d65bf45..8c5fceefaa65 100644
--- a/config/createprecomplete.py
+++ b/config/createprecomplete.py
@@ -6,8 +6,6 @@
# longer present in a complete update. The current working directory is used for
# the location to enumerate and to create the precomplete file.
-from __future__ import absolute_import, unicode_literals
-
import io
import os
diff --git a/config/external/ffi/preprocess_libffi_asm.py b/config/external/ffi/preprocess_libffi_asm.py
index b4b6a8c5ae22..4808c3a7e4f2 100644
--- a/config/external/ffi/preprocess_libffi_asm.py
+++ b/config/external/ffi/preprocess_libffi_asm.py
@@ -4,8 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distibuted with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import os
import shlex
import subprocess
diff --git a/config/external/ffi/subst_header.py b/config/external/ffi/subst_header.py
index 49c524eddc51..e1448ff889a2 100644
--- a/config/external/ffi/subst_header.py
+++ b/config/external/ffi/subst_header.py
@@ -4,8 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distibuted with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import sys
import buildconfig
diff --git a/config/external/icu/data/convert_icudata.py b/config/external/icu/data/convert_icudata.py
index b2ad5cee7375..b09affb9d85f 100644
--- a/config/external/icu/data/convert_icudata.py
+++ b/config/external/icu/data/convert_icudata.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import os
import subprocess
diff --git a/config/make-stl-wrappers.py b/config/make-stl-wrappers.py
index 0adbcb56d5a7..2fc3de42528d 100644
--- a/config/make-stl-wrappers.py
+++ b/config/make-stl-wrappers.py
@@ -1,8 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import os
import string
diff --git a/config/make-system-wrappers.py b/config/make-system-wrappers.py
index fc3fc6b29e6e..a4b3d51af1e8 100644
--- a/config/make-system-wrappers.py
+++ b/config/make-system-wrappers.py
@@ -1,8 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import os
from mozbuild.util import FileAvoidWrite
diff --git a/config/make-windows-h-wrapper.py b/config/make-windows-h-wrapper.py
index a64c318993bc..91d335ba420c 100644
--- a/config/make-windows-h-wrapper.py
+++ b/config/make-windows-h-wrapper.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import re
import string
import textwrap
diff --git a/config/mozunit/mozunit/__init__.py b/config/mozunit/mozunit/__init__.py
index c250385f9ebc..51f02c874ee4 100644
--- a/config/mozunit/mozunit/__init__.py
+++ b/config/mozunit/mozunit/__init__.py
@@ -3,6 +3,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
from .mozunit import *
diff --git a/config/mozunit/mozunit/mozunit.py b/config/mozunit/mozunit/mozunit.py
index 66a126888dc9..b295ad881f6a 100644
--- a/config/mozunit/mozunit/mozunit.py
+++ b/config/mozunit/mozunit/mozunit.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import inspect
import io
import os
diff --git a/config/mozunit/mozunit/pytest_plugin.py b/config/mozunit/mozunit/pytest_plugin.py
index 6f8aef4c1a41..e05fc579e428 100644
--- a/config/mozunit/mozunit/pytest_plugin.py
+++ b/config/mozunit/mozunit/pytest_plugin.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import pytest
diff --git a/config/mozunit/setup.py b/config/mozunit/setup.py
index b223c5116f9c..c2771b9053b9 100644
--- a/config/mozunit/setup.py
+++ b/config/mozunit/setup.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
from setuptools import setup
setup(
diff --git a/config/nsinstall.py b/config/nsinstall.py
index 01dd5988b5be..200a7ee19c91 100644
--- a/config/nsinstall.py
+++ b/config/nsinstall.py
@@ -9,8 +9,6 @@
# a full build environment set up.
# The basic limitation is, it doesn't even try to link and ignores
# all related options.
-from __future__ import absolute_import, print_function
-
import os
import os.path
import shutil
diff --git a/config/printprereleasesuffix.py b/config/printprereleasesuffix.py
index 7d4182da1d2a..a3403e3d2aac 100644
--- a/config/printprereleasesuffix.py
+++ b/config/printprereleasesuffix.py
@@ -9,8 +9,6 @@
# 2.1a3pre > ""
# 3.2b4 > " 3.2 Beta 4"
# 3.2b4pre > ""
-from __future__ import absolute_import, print_function
-
import re
import sys
diff --git a/config/rebuild_check.py b/config/rebuild_check.py
index 537a411ec1c1..a906fdc304f8 100644
--- a/config/rebuild_check.py
+++ b/config/rebuild_check.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import errno
import os
diff --git a/config/run-and-prefix.py b/config/run-and-prefix.py
index d78fceb7ff3f..af27e6743bca 100644
--- a/config/run-and-prefix.py
+++ b/config/run-and-prefix.py
@@ -6,8 +6,6 @@
# This script runs a process and prefixes its output with.
# Usage: run-and-prefix.py prefix command arg0 argv1...
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import subprocess
import sys
diff --git a/config/run_spidermonkey_checks.py b/config/run_spidermonkey_checks.py
index 0d927caee7fa..1d7ed98af31a 100644
--- a/config/run_spidermonkey_checks.py
+++ b/config/run_spidermonkey_checks.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import subprocess
import sys
diff --git a/config/tests/test_mozbuild_reading.py b/config/tests/test_mozbuild_reading.py
index 6048d416120a..17fecf1452f5 100644
--- a/config/tests/test_mozbuild_reading.py
+++ b/config/tests/test_mozbuild_reading.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, unicode_literals
-
import os
import sys
import unittest
diff --git a/config/tests/unit-mozunit.py b/config/tests/unit-mozunit.py
index 3023b6ed2044..6915d86718d6 100644
--- a/config/tests/unit-mozunit.py
+++ b/config/tests/unit-mozunit.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import os
import unittest
from tempfile import mkstemp
diff --git a/config/tests/unit-nsinstall.py b/config/tests/unit-nsinstall.py
index 3d893b7a9439..bfdf259e868c 100644
--- a/config/tests/unit-nsinstall.py
+++ b/config/tests/unit-nsinstall.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import
-
import os
import os.path
import sys
diff --git a/config/tests/unit-printprereleasesuffix.py b/config/tests/unit-printprereleasesuffix.py
index bd0296cc9f77..cebf48883ce8 100644
--- a/config/tests/unit-printprereleasesuffix.py
+++ b/config/tests/unit-printprereleasesuffix.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import
-
import unittest
import mozunit
diff --git a/config/tests/unitMozZipFile.py b/config/tests/unitMozZipFile.py
index 332f4942db69..4965dc1df3e8 100644
--- a/config/tests/unitMozZipFile.py
+++ b/config/tests/unitMozZipFile.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import copy
import os
import random
diff --git a/configure.py b/configure.py
index 842cb08ad208..fb2a1ad72498 100644
--- a/configure.py
+++ b/configure.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import codecs
import errno
import io
@@ -250,7 +248,6 @@ def config_status(config, execute=True):
"""\
#!%(python)s
# coding=utf-8
- from __future__ import unicode_literals
"""
)
% {"python": config["PYTHON3"]}
diff --git a/devtools/client/netmonitor/test/file_ws_backend_wsh.py b/devtools/client/netmonitor/test/file_ws_backend_wsh.py
index 73abb6debe18..fe74ae2065a8 100644
--- a/devtools/client/netmonitor/test/file_ws_backend_wsh.py
+++ b/devtools/client/netmonitor/test/file_ws_backend_wsh.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import
-
from mod_pywebsocket import msgutil
diff --git a/devtools/client/shared/remote-debugging/adb/xpcshell/adb.py b/devtools/client/shared/remote-debugging/adb/xpcshell/adb.py
index be21cf5bfeec..4b720a1f862f 100644
--- a/devtools/client/shared/remote-debugging/adb/xpcshell/adb.py
+++ b/devtools/client/shared/remote-debugging/adb/xpcshell/adb.py
@@ -7,8 +7,6 @@
A fake ADB binary
"""
-from __future__ import absolute_import
-
import os
import socketserver
import sys
diff --git a/devtools/shared/commands/resource/tests/websocket_backend_wsh.py b/devtools/shared/commands/resource/tests/websocket_backend_wsh.py
index 564715114b70..170f15fe6c9c 100644
--- a/devtools/shared/commands/resource/tests/websocket_backend_wsh.py
+++ b/devtools/shared/commands/resource/tests/websocket_backend_wsh.py
@@ -1,4 +1,3 @@
-from __future__ import absolute_import
from mod_pywebsocket import msgutil
diff --git a/devtools/shared/css/generated/mach_commands.py b/devtools/shared/css/generated/mach_commands.py
index db9d2c9e84a0..7a41ea49b25f 100644
--- a/devtools/shared/css/generated/mach_commands.py
+++ b/devtools/shared/css/generated/mach_commands.py
@@ -8,7 +8,6 @@ script that uses InspectorUtils to query the CSS properties used by the browser.
This information is used to generate the properties-db.js file.
"""
-from __future__ import absolute_import, print_function
import json
import logging
import os
diff --git a/devtools/shared/webconsole/GenerateDataFromWebIdls.py b/devtools/shared/webconsole/GenerateDataFromWebIdls.py
index b9006a89829f..77940cae74e5 100644
--- a/devtools/shared/webconsole/GenerateDataFromWebIdls.py
+++ b/devtools/shared/webconsole/GenerateDataFromWebIdls.py
@@ -11,7 +11,6 @@ Run this script via
with a mozconfig that references a built non-artifact build.
"""
-from __future__ import absolute_import, unicode_literals, print_function
from os import path, remove, system
import json
import WebIDL
diff --git a/devtools/shared/webconsole/GenerateReservedWordsJS.py b/devtools/shared/webconsole/GenerateReservedWordsJS.py
index 4ecc35feff81..cd8a47b648dc 100644
--- a/devtools/shared/webconsole/GenerateReservedWordsJS.py
+++ b/devtools/shared/webconsole/GenerateReservedWordsJS.py
@@ -2,7 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
import re
import sys
diff --git a/docs/conf.py b/docs/conf.py
index 32fac2841285..eee8ca316ee8 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, unicode_literals
-
import os
import sys
diff --git a/dom/base/gen-usecounters.py b/dom/base/gen-usecounters.py
index 6b38152f1f0d..bd0dba7b0bbc 100755
--- a/dom/base/gen-usecounters.py
+++ b/dom/base/gen-usecounters.py
@@ -4,8 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
import os
import sys
diff --git a/dom/bindings/mach_commands.py b/dom/bindings/mach_commands.py
index c76400c21415..b9bb17bf7cdc 100644
--- a/dom/bindings/mach_commands.py
+++ b/dom/bindings/mach_commands.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, # You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, unicode_literals
-
import os
import sys
diff --git a/dom/bindings/mozwebidlcodegen/__init__.py b/dom/bindings/mozwebidlcodegen/__init__.py
index 5078ee38a6bf..5d54c2bae273 100644
--- a/dom/bindings/mozwebidlcodegen/__init__.py
+++ b/dom/bindings/mozwebidlcodegen/__init__.py
@@ -5,8 +5,6 @@
# This module contains code for managing WebIDL files and bindings for
# the build system.
-from __future__ import print_function, unicode_literals
-
import errno
import hashlib
import io
diff --git a/dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py b/dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py
index 25f5a4f059d6..44442f78fda2 100644
--- a/dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py
+++ b/dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import unicode_literals
-
import imp
import io
import json
diff --git a/dom/bindings/parser/WebIDL.py b/dom/bindings/parser/WebIDL.py
index 70b236113812..6a467c0fa0dd 100644
--- a/dom/bindings/parser/WebIDL.py
+++ b/dom/bindings/parser/WebIDL.py
@@ -4,8 +4,6 @@
""" A WebIDL parser. """
-from __future__ import print_function
-
import copy
import math
import os
diff --git a/dom/bindings/parser/runtests.py b/dom/bindings/parser/runtests.py
index abf16a7b190c..95e540bd77ff 100644
--- a/dom/bindings/parser/runtests.py
+++ b/dom/bindings/parser/runtests.py
@@ -1,8 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
import os
import sys
import glob
diff --git a/extensions/pref/autoconfig/test/marionette/test_autoconfig.py b/extensions/pref/autoconfig/test/marionette/test_autoconfig.py
index 74ee4059a9e5..0cdc0feede44 100644
--- a/extensions/pref/autoconfig/test/marionette/test_autoconfig.py
+++ b/extensions/pref/autoconfig/test/marionette/test_autoconfig.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import os
import shutil
diff --git a/gfx/layers/d3d11/genshaders.py b/gfx/layers/d3d11/genshaders.py
index 49fed0500470..b9701978d5c2 100644
--- a/gfx/layers/d3d11/genshaders.py
+++ b/gfx/layers/d3d11/genshaders.py
@@ -1,8 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import argparse
import codecs
import locale
diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py
index 7c98b9865736..20e29297331b 100755
--- a/gfx/skia/generate_mozbuild.py
+++ b/gfx/skia/generate_mozbuild.py
@@ -1,6 +1,5 @@
#!/usr/bin/env python
-from __future__ import print_function
import locale
import subprocess
from collections import defaultdict
diff --git a/gfx/thebes/gencjkcisvs.py b/gfx/thebes/gencjkcisvs.py
index c61da73c4260..1797f2be6c95 100644
--- a/gfx/thebes/gencjkcisvs.py
+++ b/gfx/thebes/gencjkcisvs.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import os.path
import re
import sys
diff --git a/intl/icu_sources_data.py b/intl/icu_sources_data.py
index 0158f37295d2..0ebbab4938b3 100644
--- a/intl/icu_sources_data.py
+++ b/intl/icu_sources_data.py
@@ -10,8 +10,6 @@
# This script expects to be run from `update-icu.sh` after the in-tree
# copy of ICU has been updated.
-from __future__ import absolute_import, print_function
-
import glob
import multiprocessing
import os
diff --git a/intl/unicharutil/util/base_chars.py b/intl/unicharutil/util/base_chars.py
index 7133cf25b52f..91d3ba335255 100644
--- a/intl/unicharutil/util/base_chars.py
+++ b/intl/unicharutil/util/base_chars.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import re
from collections import namedtuple
from unicodedata import category, combining, normalize
diff --git a/ipc/ipdl/ipdl.py b/ipc/ipdl/ipdl.py
index 365f950c568a..1770416aaac9 100644
--- a/ipc/ipdl/ipdl.py
+++ b/ipc/ipdl/ipdl.py
@@ -1,8 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
import optparse
import os
import sys
diff --git a/ipc/ipdl/ipdl/__init__.py b/ipc/ipdl/ipdl/__init__.py
index a85a12e14a99..50ceb4f95303 100644
--- a/ipc/ipdl/ipdl/__init__.py
+++ b/ipc/ipdl/ipdl/__init__.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
__all__ = [
"gencxx",
"genipdl",
diff --git a/ipc/ipdl/ipdl/checker.py b/ipc/ipdl/ipdl/checker.py
index eb969b4d60bc..c93dc3e0e837 100644
--- a/ipc/ipdl/ipdl/checker.py
+++ b/ipc/ipdl/ipdl/checker.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
import sys
from ipdl.ast import Visitor, ASYNC
diff --git a/ipc/ipdl/ipdl/type.py b/ipc/ipdl/ipdl/type.py
index eb71cae5c651..f8689dee60d2 100644
--- a/ipc/ipdl/ipdl/type.py
+++ b/ipc/ipdl/ipdl/type.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
import os
import sys
diff --git a/ipc/ipdl/msgtype-components b/ipc/ipdl/msgtype-components
index 35229182a22c..4a01d3a71cc3 100644
--- a/ipc/ipdl/msgtype-components
+++ b/ipc/ipdl/msgtype-components
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
import sys
msgid = int(sys.argv[1])
diff --git a/ipc/ipdl/test/cxx/genIPDLUnitTests.py b/ipc/ipdl/test/cxx/genIPDLUnitTests.py
index 3636ec041683..160b90a031c3 100644
--- a/ipc/ipdl/test/cxx/genIPDLUnitTests.py
+++ b/ipc/ipdl/test/cxx/genIPDLUnitTests.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function, unicode_literals
-
import string
import sys
diff --git a/js/src/builtin/embedjs.py b/js/src/builtin/embedjs.py
index 06510fe70052..a82aaab951e8 100644
--- a/js/src/builtin/embedjs.py
+++ b/js/src/builtin/embedjs.py
@@ -36,8 +36,6 @@
#
# It uses the C preprocessor to process its inputs.
-from __future__ import with_statement
-
import errno
import os
import re
diff --git a/js/src/builtin/intl/make_intl_data.py b/js/src/builtin/intl/make_intl_data.py
index a65764e0141e..1f9d7ff30e47 100755
--- a/js/src/builtin/intl/make_intl_data.py
+++ b/js/src/builtin/intl/make_intl_data.py
@@ -41,8 +41,6 @@
simple digit mappings and verifies that it's in sync with ICU/CLDR.
"""
-from __future__ import print_function
-
import io
import json
import os
diff --git a/js/src/devtools/rootAnalysis/explain.py b/js/src/devtools/rootAnalysis/explain.py
index 09c1c64f5fd1..becfcf17a093 100755
--- a/js/src/devtools/rootAnalysis/explain.py
+++ b/js/src/devtools/rootAnalysis/explain.py
@@ -4,8 +4,6 @@
# You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
import argparse
import re
from collections import defaultdict
diff --git a/js/src/devtools/rootAnalysis/mach_commands.py b/js/src/devtools/rootAnalysis/mach_commands.py
index a52ab2b3d4c0..2127282a916f 100644
--- a/js/src/devtools/rootAnalysis/mach_commands.py
+++ b/js/src/devtools/rootAnalysis/mach_commands.py
@@ -5,8 +5,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import argparse
import json
import os
diff --git a/js/src/devtools/rootAnalysis/run-test.py b/js/src/devtools/rootAnalysis/run-test.py
index 3eef3844e844..2768f3be1b70 100755
--- a/js/src/devtools/rootAnalysis/run-test.py
+++ b/js/src/devtools/rootAnalysis/run-test.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
import argparse
import os
import site
diff --git a/js/src/frontend/align_stack_comment.py b/js/src/frontend/align_stack_comment.py
index 1c439df97348..28d5d8cf7fe1 100755
--- a/js/src/frontend/align_stack_comment.py
+++ b/js/src/frontend/align_stack_comment.py
@@ -13,8 +13,6 @@
// [stack] VAL1 VAL2 VAL3
"""
-from __future__ import print_function
-
import re
import sys
diff --git a/js/src/jit-test/jit_test.py b/js/src/jit-test/jit_test.py
index e21ff3517f3b..32765a20dd75 100755
--- a/js/src/jit-test/jit_test.py
+++ b/js/src/jit-test/jit_test.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function, unicode_literals
-
import math
import os
import platform
diff --git a/js/src/tests/compare_bench.py b/js/src/tests/compare_bench.py
index daa28d3a7de2..be8721a2fa5c 100644
--- a/js/src/tests/compare_bench.py
+++ b/js/src/tests/compare_bench.py
@@ -2,8 +2,6 @@
"""usage: %progname candidate_path baseline_path
"""
-from __future__ import print_function
-
import json
import optparse
from operator import itemgetter
diff --git a/js/src/tests/jstests.py b/js/src/tests/jstests.py
index c22937c2234f..cc11c3dfc294 100755
--- a/js/src/tests/jstests.py
+++ b/js/src/tests/jstests.py
@@ -9,8 +9,6 @@ The JS Shell Test Harness.
See the adjacent README.txt for more details.
"""
-from __future__ import print_function
-
import math
import os
import platform
diff --git a/js/src/tests/lib/jittests.py b/js/src/tests/lib/jittests.py
index 233711019a8e..de92067c3acb 100755
--- a/js/src/tests/lib/jittests.py
+++ b/js/src/tests/lib/jittests.py
@@ -6,8 +6,6 @@
# jit_test.py -- Python harness for JavaScript trace tests.
-from __future__ import print_function
-
import os
import re
import sys
diff --git a/js/src/tests/lib/manifest.py b/js/src/tests/lib/manifest.py
index 91fdd7b21c9f..26c6821ed9db 100644
--- a/js/src/tests/lib/manifest.py
+++ b/js/src/tests/lib/manifest.py
@@ -2,8 +2,6 @@
#
# This includes classes for representing and parsing JS manifests.
-from __future__ import print_function
-
import io
import os
import posixpath
diff --git a/js/src/tests/lib/results.py b/js/src/tests/lib/results.py
index f9c7746c01b5..f90206035427 100644
--- a/js/src/tests/lib/results.py
+++ b/js/src/tests/lib/results.py
@@ -1,5 +1,3 @@
-from __future__ import print_function
-
import json
import pipes
import re
diff --git a/js/src/tests/lib/structuredlog.py b/js/src/tests/lib/structuredlog.py
index 3196cc139a28..2f2d317d0208 100644
--- a/js/src/tests/lib/structuredlog.py
+++ b/js/src/tests/lib/structuredlog.py
@@ -1,8 +1,6 @@
# produce mozlog-compatible log messages, following the spec at
# https://mozbase.readthedocs.io/en/latest/mozlog.html
-from __future__ import print_function
-
import json
import os
from time import time
diff --git a/js/src/tests/lib/tasks_adb_remote.py b/js/src/tests/lib/tasks_adb_remote.py
index 767b36461ca6..e03d253873c8 100644
--- a/js/src/tests/lib/tasks_adb_remote.py
+++ b/js/src/tests/lib/tasks_adb_remote.py
@@ -1,8 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-from __future__ import division, print_function, unicode_literals
-
import os
import posixpath
import sys
diff --git a/js/src/tests/lib/tasks_win.py b/js/src/tests/lib/tasks_win.py
index 0f3143f11707..3a5b20298f3d 100644
--- a/js/src/tests/lib/tasks_win.py
+++ b/js/src/tests/lib/tasks_win.py
@@ -1,8 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-from __future__ import division, print_function, unicode_literals
-
import subprocess
import sys
from datetime import datetime, timedelta
diff --git a/js/src/tests/lib/tempfile.py b/js/src/tests/lib/tempfile.py
index bde9fbc5b520..604864dce10b 100644
--- a/js/src/tests/lib/tempfile.py
+++ b/js/src/tests/lib/tempfile.py
@@ -1,8 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
try:
# Python 3.2
from tempfile import TemporaryDirectory
diff --git a/js/src/tests/non262/String/make-normalize-generateddata-input.py b/js/src/tests/non262/String/make-normalize-generateddata-input.py
index be1f71d2d96c..5c3d2d3e442c 100644
--- a/js/src/tests/non262/String/make-normalize-generateddata-input.py
+++ b/js/src/tests/non262/String/make-normalize-generateddata-input.py
@@ -7,8 +7,6 @@
to js/src/tests/non262/String/normalize-generateddata-input.js
"""
-from __future__ import print_function
-
import re
import sys
diff --git a/js/src/tests/parsemark.py b/js/src/tests/parsemark.py
index 8f26f7160d7a..199747e7dd5c 100644
--- a/js/src/tests/parsemark.py
+++ b/js/src/tests/parsemark.py
@@ -21,8 +21,6 @@ Arguments:
dirpath directory filled with parsilicious js files
"""
-from __future__ import print_function
-
import json
import math
import optparse
diff --git a/js/src/tests/test262-export.py b/js/src/tests/test262-export.py
index 89539b680ad4..ebcb388a29be 100755
--- a/js/src/tests/test262-export.py
+++ b/js/src/tests/test262-export.py
@@ -5,8 +5,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
import os
import re
import shutil
diff --git a/js/src/tests/test262-update.py b/js/src/tests/test262-update.py
index 739e7fc43fa4..d2d67763d2e9 100755
--- a/js/src/tests/test262-update.py
+++ b/js/src/tests/test262-update.py
@@ -5,8 +5,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
import contextlib
import io
import os
diff --git a/js/src/util/make_unicode.py b/js/src/util/make_unicode.py
index cf3899c76827..617268fa9cb7 100755
--- a/js/src/util/make_unicode.py
+++ b/js/src/util/make_unicode.py
@@ -19,8 +19,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-from __future__ import print_function, unicode_literals
-
import csv
import io
import os
diff --git a/js/xpconnect/loader/script_cache.py b/js/xpconnect/loader/script_cache.py
index 5f84b16dd7ac..bd3a746fcf74 100755
--- a/js/xpconnect/loader/script_cache.py
+++ b/js/xpconnect/loader/script_cache.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import io
import os
import struct
diff --git a/layout/base/tests/marionette/selection.py b/layout/base/tests/marionette/selection.py
index 40e4e052dfcf..6cfe155927d6 100644
--- a/layout/base/tests/marionette/selection.py
+++ b/layout/base/tests/marionette/selection.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
from marionette_driver.marionette import Actions, errors
diff --git a/layout/reftests/border-image/gen-refs.py b/layout/reftests/border-image/gen-refs.py
index 5dfa38b38bed..029d46f2a899 100644
--- a/layout/reftests/border-image/gen-refs.py
+++ b/layout/reftests/border-image/gen-refs.py
@@ -27,8 +27,6 @@
# Assumes there is no intrinsic size for the border-image-source, so uses
# the size of the border image area.
-from __future__ import print_function, absolute_import
-
import sys
diff --git a/layout/reftests/fonts/gsubtest/makegsubfonts.py b/layout/reftests/fonts/gsubtest/makegsubfonts.py
index 66ce3c324704..73d022e6be2b 100644
--- a/layout/reftests/fonts/gsubtest/makegsubfonts.py
+++ b/layout/reftests/fonts/gsubtest/makegsubfonts.py
@@ -1,5 +1,3 @@
-from __future__ import print_function, absolute_import
-
import os
import textwrap
from xml.etree import ElementTree
diff --git a/layout/reftests/fonts/mark-generate.py b/layout/reftests/fonts/mark-generate.py
index 11bc7ecca72d..01e2d005480a 100755
--- a/layout/reftests/fonts/mark-generate.py
+++ b/layout/reftests/fonts/mark-generate.py
@@ -15,8 +15,6 @@
# To install what you need, on Ubuntu,
# sudo apt-get install python-fontforge
-from __future__ import print_function, absolute_import
-
import fontforge
# generate a set of fonts, each with our special glyph at one codepoint,
diff --git a/layout/reftests/fonts/math/generate.py b/layout/reftests/fonts/math/generate.py
index 54e1f05f501a..9981208c300e 100644
--- a/layout/reftests/fonts/math/generate.py
+++ b/layout/reftests/fonts/math/generate.py
@@ -15,7 +15,6 @@
# To install what you need, on Ubuntu,
# sudo apt-get install python-fontforge
-from __future__ import print_function, absolute_import
import fontforge
em = 1000
diff --git a/layout/style/test/gen-css-properties.py b/layout/style/test/gen-css-properties.py
index ec91b695cdc0..1d6fad226db3 100644
--- a/layout/style/test/gen-css-properties.py
+++ b/layout/style/test/gen-css-properties.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
import os
import sys
import subprocess
diff --git a/layout/tools/reftest/mach_commands.py b/layout/tools/reftest/mach_commands.py
index 96595c3fe37a..bd99ac439365 100644
--- a/layout/tools/reftest/mach_commands.py
+++ b/layout/tools/reftest/mach_commands.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import re
import sys
diff --git a/layout/tools/reftest/mach_test_package_commands.py b/layout/tools/reftest/mach_test_package_commands.py
index 56599647c5e7..4effd4cfda23 100644
--- a/layout/tools/reftest/mach_test_package_commands.py
+++ b/layout/tools/reftest/mach_test_package_commands.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import sys
from argparse import Namespace
diff --git a/layout/tools/reftest/output.py b/layout/tools/reftest/output.py
index b181b3fb5447..fe435eb54592 100644
--- a/layout/tools/reftest/output.py
+++ b/layout/tools/reftest/output.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import json
import threading
from collections import defaultdict
diff --git a/layout/tools/reftest/reftest/__init__.py b/layout/tools/reftest/reftest/__init__.py
index e3ed9b53e13d..f82a07ec44cd 100644
--- a/layout/tools/reftest/reftest/__init__.py
+++ b/layout/tools/reftest/reftest/__init__.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import io
import os
import re
diff --git a/layout/tools/reftest/reftestcommandline.py b/layout/tools/reftest/reftestcommandline.py
index 70958b2dc9c6..e2f0baff8c45 100644
--- a/layout/tools/reftest/reftestcommandline.py
+++ b/layout/tools/reftest/reftestcommandline.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, print_function
-
import argparse
import os
import sys
diff --git a/layout/tools/reftest/remotereftest.py b/layout/tools/reftest/remotereftest.py
index 8b22fb2c7884..8d5e3fb44f00 100644
--- a/layout/tools/reftest/remotereftest.py
+++ b/layout/tools/reftest/remotereftest.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import datetime
import os
import posixpath
diff --git a/layout/tools/reftest/runreftest.py b/layout/tools/reftest/runreftest.py
index 052f037693f5..60806c202fc7 100644
--- a/layout/tools/reftest/runreftest.py
+++ b/layout/tools/reftest/runreftest.py
@@ -5,8 +5,6 @@
"""
Runs the reftest test harness.
"""
-from __future__ import absolute_import, print_function
-
import json
import multiprocessing
import os
diff --git a/layout/tools/reftest/selftest/conftest.py b/layout/tools/reftest/selftest/conftest.py
index 0beeb096f1da..1255caf8a7fe 100644
--- a/layout/tools/reftest/selftest/conftest.py
+++ b/layout/tools/reftest/selftest/conftest.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import json
import os
from argparse import Namespace
diff --git a/layout/tools/reftest/selftest/test_python_manifest_parser.py b/layout/tools/reftest/selftest/test_python_manifest_parser.py
index 339aadfeb317..5ec9ce324cb6 100644
--- a/layout/tools/reftest/selftest/test_python_manifest_parser.py
+++ b/layout/tools/reftest/selftest/test_python_manifest_parser.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import mozunit
import pytest
diff --git a/layout/tools/reftest/selftest/test_reftest_manifest_parser.py b/layout/tools/reftest/selftest/test_reftest_manifest_parser.py
index c1b715cb288f..009aa17a7fbb 100644
--- a/layout/tools/reftest/selftest/test_reftest_manifest_parser.py
+++ b/layout/tools/reftest/selftest/test_reftest_manifest_parser.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import mozunit
import pytest
diff --git a/layout/tools/reftest/selftest/test_reftest_output.py b/layout/tools/reftest/selftest/test_reftest_output.py
index 1ca48d42cdb5..ef343f754d74 100644
--- a/layout/tools/reftest/selftest/test_reftest_output.py
+++ b/layout/tools/reftest/selftest/test_reftest_output.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import os
try:
diff --git a/mach b/mach
index 7e00054bf5a1..5811a8fd6e6c 100755
--- a/mach
+++ b/mach
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import platform
import sys
diff --git a/memory/replace/dmd/dmd.py b/memory/replace/dmd/dmd.py
index 9e39f20b55c9..2fa7fccbb1a8 100755
--- a/memory/replace/dmd/dmd.py
+++ b/memory/replace/dmd/dmd.py
@@ -6,8 +6,6 @@
"""This script analyzes a JSON file emitted by DMD."""
-from __future__ import absolute_import, division, print_function
-
import argparse
import collections
import gzip
@@ -639,7 +637,7 @@ def printDigest(args, digest):
cond = is_match
elif arg.startswith("!"):
key = arg[1:]
- cond = lambda rec, key: not is_match(rec, key) # noqa: E731
+ def cond(rec, key): return not is_match(rec, key) # noqa: E731
else:
key = arg
cond = is_match
diff --git a/memory/replace/dmd/test/scan-test.py b/memory/replace/dmd/test/scan-test.py
index f5d6fb4567fb..c282b026934e 100644
--- a/memory/replace/dmd/test/scan-test.py
+++ b/memory/replace/dmd/test/scan-test.py
@@ -6,8 +6,6 @@
"""Testing for the JSON file emitted by DMD heap scan mode when running SmokeDMD."""
-from __future__ import absolute_import, division, print_function
-
import argparse
import gzip
import json
diff --git a/memory/replace/logalloc/replay/logalloc_munge.py b/memory/replace/logalloc/replay/logalloc_munge.py
index 4d40670fc868..52d0032463a8 100644
--- a/memory/replace/logalloc/replay/logalloc_munge.py
+++ b/memory/replace/logalloc/replay/logalloc_munge.py
@@ -18,8 +18,6 @@ The resulting output is:
See README for more details.
"""
-from __future__ import absolute_import, print_function
-
import sys
from collections import defaultdict, deque
diff --git a/mobile/android/gen_from_jinja.py b/mobile/android/gen_from_jinja.py
index 1f3bbc122c82..6c625226ee31 100644
--- a/mobile/android/gen_from_jinja.py
+++ b/mobile/android/gen_from_jinja.py
@@ -4,8 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import os
from jinja2 import Environment, FileSystemLoader, StrictUndefined
diff --git a/mobile/android/gradle.py b/mobile/android/gradle.py
index d9b355d987f8..9f310ddb7bd8 100644
--- a/mobile/android/gradle.py
+++ b/mobile/android/gradle.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import os
import subprocess
import sys
diff --git a/mobile/android/locales/filter.py b/mobile/android/locales/filter.py
index 6728f362eb63..94a14b95c96e 100644
--- a/mobile/android/locales/filter.py
+++ b/mobile/android/locales/filter.py
@@ -7,8 +7,6 @@ reported and l10n-merged.
This needs to stay in sync with the copy in mobile/locales.
"""
-from __future__ import absolute_import
-
def test(mod, path, entity=None):
import re
diff --git a/mobile/android/mach_commands.py b/mobile/android/mach_commands.py
index a6dd48bbb1f0..14125cfe05bf 100644
--- a/mobile/android/mach_commands.py
+++ b/mobile/android/mach_commands.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import argparse
import logging
import os
diff --git a/mobile/locales/filter.py b/mobile/locales/filter.py
index 3e753a14a3bf..311d785f2c16 100644
--- a/mobile/locales/filter.py
+++ b/mobile/locales/filter.py
@@ -7,8 +7,6 @@ reported and l10n-merged.
This needs to stay in sync with the copy in mobile/android/locales.
"""
-from __future__ import absolute_import
-
def test(mod, path, entity=None):
import re
diff --git a/modules/libpref/init/generate_static_pref_list.py b/modules/libpref/init/generate_static_pref_list.py
index 5242c12214bc..8656df681d88 100644
--- a/modules/libpref/init/generate_static_pref_list.py
+++ b/modules/libpref/init/generate_static_pref_list.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
import os
import sys
from collections import defaultdict
diff --git a/modules/libpref/test/test_generate_static_pref_list.py b/modules/libpref/test/test_generate_static_pref_list.py
index 6fa7104c4704..118aa47ec64f 100644
--- a/modules/libpref/test/test_generate_static_pref_list.py
+++ b/modules/libpref/test/test_generate_static_pref_list.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import sys
import unittest
from os import path
diff --git a/remote/mach_commands.py b/remote/mach_commands.py
index 2fe60badf180..200f24eec6fc 100644
--- a/remote/mach_commands.py
+++ b/remote/mach_commands.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, # You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import argparse
import json
import os
diff --git a/security/manager/tools/getCTKnownLogs.py b/security/manager/tools/getCTKnownLogs.py
index 3270f567ed16..a121283a6a94 100755
--- a/security/manager/tools/getCTKnownLogs.py
+++ b/security/manager/tools/getCTKnownLogs.py
@@ -14,8 +14,6 @@ and edited to include the disqualification time for the disqualified logs using
https://cs.chromium.org/chromium/src/net/cert/ct_known_logs_static-inc.h
"""
-from __future__ import print_function
-
import argparse
import base64
import datetime
diff --git a/security/sandbox/test/mac_register_font.py b/security/sandbox/test/mac_register_font.py
index d537e5837609..549becf565af 100755
--- a/security/sandbox/test/mac_register_font.py
+++ b/security/sandbox/test/mac_register_font.py
@@ -9,8 +9,6 @@ mac_register_font.py
Mac-specific utility command to register a font file with the OS.
"""
-from __future__ import print_function
-
import argparse
import sys
diff --git a/taskcluster/docker/firefox-flatpak/extract_locales_from_l10n_json.py b/taskcluster/docker/firefox-flatpak/extract_locales_from_l10n_json.py
index d3cb62bcb3f4..b1eb745d7f9e 100644
--- a/taskcluster/docker/firefox-flatpak/extract_locales_from_l10n_json.py
+++ b/taskcluster/docker/firefox-flatpak/extract_locales_from_l10n_json.py
@@ -7,8 +7,6 @@
"""
-from __future__ import absolute_import, print_function
-
import json
import sys
diff --git a/taskcluster/docker/firefox-snap/extract_locales_from_l10n_json.py b/taskcluster/docker/firefox-snap/extract_locales_from_l10n_json.py
index c52b2dd47193..07bc007a3114 100644
--- a/taskcluster/docker/firefox-snap/extract_locales_from_l10n_json.py
+++ b/taskcluster/docker/firefox-snap/extract_locales_from_l10n_json.py
@@ -4,8 +4,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import json
import sys
diff --git a/taskcluster/docker/funsize-update-generator/scripts/funsize.py b/taskcluster/docker/funsize-update-generator/scripts/funsize.py
index 817389945dd8..84fd2fbd0bfc 100644
--- a/taskcluster/docker/funsize-update-generator/scripts/funsize.py
+++ b/taskcluster/docker/funsize-update-generator/scripts/funsize.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, division, print_function
-
import argparse
import asyncio
import configparser
diff --git a/taskcluster/docker/updatebot/run.py b/taskcluster/docker/updatebot/run.py
index c4e2880d1c93..ad9bcb8788df 100755
--- a/taskcluster/docker/updatebot/run.py
+++ b/taskcluster/docker/updatebot/run.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, # You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import sys
sys.path.append("/builds/worker/checkouts/gecko/third_party/python")
diff --git a/taskcluster/mach_commands.py b/taskcluster/mach_commands.py
index d28f5e2bd029..b752cb7d16bc 100644
--- a/taskcluster/mach_commands.py
+++ b/taskcluster/mach_commands.py
@@ -5,8 +5,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import argparse
import json
import logging
diff --git a/taskcluster/scripts/misc/fetch-chromium.py b/taskcluster/scripts/misc/fetch-chromium.py
index a731ca4a1365..941aa846316e 100644
--- a/taskcluster/scripts/misc/fetch-chromium.py
+++ b/taskcluster/scripts/misc/fetch-chromium.py
@@ -11,8 +11,6 @@ defined version) for a given platform. It then uploads the build,
with the revision of the build stored in a REVISION file.
"""
-from __future__ import absolute_import, print_function
-
import argparse
import errno
import os
diff --git a/taskcluster/scripts/misc/repack_rust.py b/taskcluster/scripts/misc/repack_rust.py
index f22b2605be98..e0b10aaecbad 100755
--- a/taskcluster/scripts/misc/repack_rust.py
+++ b/taskcluster/scripts/misc/repack_rust.py
@@ -9,8 +9,6 @@ with the necessary tool and target support for the Firefox
build environment.
"""
-from __future__ import absolute_import, print_function
-
import argparse
import errno
import glob
diff --git a/taskcluster/scripts/tester/run-wizard b/taskcluster/scripts/tester/run-wizard
index 9892737352f0..99ecb6ff2fb6 100755
--- a/taskcluster/scripts/tester/run-wizard
+++ b/taskcluster/scripts/tester/run-wizard
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this,
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function, unicode_literals
-
import datetime
import os
import subprocess
diff --git a/taskcluster/test/conftest.py b/taskcluster/test/conftest.py
index 15baf7453a7d..9001958c6a21 100644
--- a/taskcluster/test/conftest.py
+++ b/taskcluster/test/conftest.py
@@ -1,8 +1,6 @@
# Any copyright is dedicated to the public domain.
# http://creativecommons.org/publicdomain/zero/1.0/
-from __future__ import absolute_import
-
import json
import logging
import os
diff --git a/taskcluster/test/test_autoland.py b/taskcluster/test/test_autoland.py
index 4d49997618ef..05d181620aa9 100644
--- a/taskcluster/test/test_autoland.py
+++ b/taskcluster/test/test_autoland.py
@@ -1,8 +1,6 @@
# Any copyright is dedicated to the public domain.
# http://creativecommons.org/publicdomain/zero/1.0/
-from __future__ import absolute_import, print_function, unicode_literals
-
import pytest
from mozunit import main
diff --git a/taskcluster/test/test_autoland_backstop.py b/taskcluster/test/test_autoland_backstop.py
index 23eff55ce18f..55ea11ca4d52 100644
--- a/taskcluster/test/test_autoland_backstop.py
+++ b/taskcluster/test/test_autoland_backstop.py
@@ -1,8 +1,6 @@
# Any copyright is dedicated to the public domain.
# http://creativecommons.org/publicdomain/zero/1.0/
-from __future__ import absolute_import, print_function, unicode_literals
-
import pytest
from mozunit import main
diff --git a/taskcluster/test/test_mach_try_auto.py b/taskcluster/test/test_mach_try_auto.py
index 379459fca1fc..f26110b57f95 100644
--- a/taskcluster/test/test_mach_try_auto.py
+++ b/taskcluster/test/test_mach_try_auto.py
@@ -1,8 +1,6 @@
# Any copyright is dedicated to the public domain.
# http://creativecommons.org/publicdomain/zero/1.0/
-from __future__ import absolute_import, print_function, unicode_literals
-
import pytest
from gecko_taskgraph.util.bugbug import push_schedules
from gecko_taskgraph.util.chunking import BugbugLoader
diff --git a/taskcluster/test/test_mozilla_central.py b/taskcluster/test/test_mozilla_central.py
index 042b14a18a57..696a108db671 100644
--- a/taskcluster/test/test_mozilla_central.py
+++ b/taskcluster/test/test_mozilla_central.py
@@ -1,8 +1,6 @@
# Any copyright is dedicated to the public domain.
# http://creativecommons.org/publicdomain/zero/1.0/
-from __future__ import absolute_import, print_function, unicode_literals
-
import pytest
from mozunit import main
diff --git a/toolkit/components/telemetry/build_scripts/gen_event_data.py b/toolkit/components/telemetry/build_scripts/gen_event_data.py
index ae90626a5d3e..2e321cea7283 100644
--- a/toolkit/components/telemetry/build_scripts/gen_event_data.py
+++ b/toolkit/components/telemetry/build_scripts/gen_event_data.py
@@ -5,8 +5,6 @@
# Write out event information for C++. The events are defined
# in a file provided as a command-line argument.
-from __future__ import print_function
-
import itertools
import json
import sys
diff --git a/toolkit/components/telemetry/build_scripts/gen_event_enum.py b/toolkit/components/telemetry/build_scripts/gen_event_enum.py
index 3e106d328239..9dd418b3dd04 100644
--- a/toolkit/components/telemetry/build_scripts/gen_event_enum.py
+++ b/toolkit/components/telemetry/build_scripts/gen_event_enum.py
@@ -6,8 +6,6 @@
#
# The events are defined in files provided as command-line arguments.
-from __future__ import print_function
-
import sys
import buildconfig
diff --git a/toolkit/components/telemetry/build_scripts/gen_histogram_data.py b/toolkit/components/telemetry/build_scripts/gen_histogram_data.py
index eb33058aab89..a203dde9f9c1 100644
--- a/toolkit/components/telemetry/build_scripts/gen_histogram_data.py
+++ b/toolkit/components/telemetry/build_scripts/gen_histogram_data.py
@@ -5,8 +5,6 @@
# Write out histogram information for C++. The histograms are defined
# in a file provided as a command-line argument.
-from __future__ import print_function
-
import sys
from os import path
diff --git a/toolkit/components/telemetry/build_scripts/gen_histogram_enum.py b/toolkit/components/telemetry/build_scripts/gen_histogram_enum.py
index ad1c5bcbbf58..8f224c5140d1 100644
--- a/toolkit/components/telemetry/build_scripts/gen_histogram_enum.py
+++ b/toolkit/components/telemetry/build_scripts/gen_histogram_enum.py
@@ -12,8 +12,6 @@
#
# The histograms are defined in files provided as command-line arguments.
-from __future__ import print_function
-
import itertools
import sys
diff --git a/toolkit/components/telemetry/build_scripts/gen_histogram_phf.py b/toolkit/components/telemetry/build_scripts/gen_histogram_phf.py
index 779333d183b3..38c724550675 100644
--- a/toolkit/components/telemetry/build_scripts/gen_histogram_phf.py
+++ b/toolkit/components/telemetry/build_scripts/gen_histogram_phf.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
from mozparsers.shared_telemetry_utils import ParserError
from perfecthash import PerfectHash
diff --git a/toolkit/components/telemetry/build_scripts/gen_process_data.py b/toolkit/components/telemetry/build_scripts/gen_process_data.py
index 7c6dff3401d4..2a494689adde 100644
--- a/toolkit/components/telemetry/build_scripts/gen_process_data.py
+++ b/toolkit/components/telemetry/build_scripts/gen_process_data.py
@@ -5,8 +5,6 @@
# Write out processes data for C++. The processes are defined
# in a file provided as a command-line argument.
-from __future__ import print_function
-
import collections
import sys
diff --git a/toolkit/components/telemetry/build_scripts/gen_process_enum.py b/toolkit/components/telemetry/build_scripts/gen_process_enum.py
index d8a1405e0c21..bfe2d65e436b 100644
--- a/toolkit/components/telemetry/build_scripts/gen_process_enum.py
+++ b/toolkit/components/telemetry/build_scripts/gen_process_enum.py
@@ -5,8 +5,6 @@
# Write out processes data for C++. The processes are defined
# in a file provided as a command-line argument.
-from __future__ import print_function
-
import collections
import sys
diff --git a/toolkit/components/telemetry/build_scripts/gen_scalar_data.py b/toolkit/components/telemetry/build_scripts/gen_scalar_data.py
index c5a41bb2c801..6ef1f457b54b 100644
--- a/toolkit/components/telemetry/build_scripts/gen_scalar_data.py
+++ b/toolkit/components/telemetry/build_scripts/gen_scalar_data.py
@@ -5,8 +5,6 @@
# Write out scalar information for C++. The scalars are defined
# in a file provided as a command-line argument.
-from __future__ import print_function
-
import json
import sys
from collections import OrderedDict
diff --git a/toolkit/components/telemetry/build_scripts/gen_scalar_enum.py b/toolkit/components/telemetry/build_scripts/gen_scalar_enum.py
index 616f2a8918ef..321cd047d749 100644
--- a/toolkit/components/telemetry/build_scripts/gen_scalar_enum.py
+++ b/toolkit/components/telemetry/build_scripts/gen_scalar_enum.py
@@ -7,8 +7,6 @@
#
# The scalars are defined in files provided as command-line arguments.
-from __future__ import print_function
-
import sys
import buildconfig
diff --git a/toolkit/components/telemetry/build_scripts/gen_userinteraction_data.py b/toolkit/components/telemetry/build_scripts/gen_userinteraction_data.py
index bd5b1131a3b4..b12cbde2399b 100644
--- a/toolkit/components/telemetry/build_scripts/gen_userinteraction_data.py
+++ b/toolkit/components/telemetry/build_scripts/gen_userinteraction_data.py
@@ -5,8 +5,6 @@
# Write out UserInteraction information for C++. The UserInteractions are
# defined in a file provided as a command-line argument.
-from __future__ import print_function
-
import sys
from os import path
diff --git a/toolkit/components/telemetry/build_scripts/gen_userinteraction_phf.py b/toolkit/components/telemetry/build_scripts/gen_userinteraction_phf.py
index 9731ec50d12c..f1c725641436 100644
--- a/toolkit/components/telemetry/build_scripts/gen_userinteraction_phf.py
+++ b/toolkit/components/telemetry/build_scripts/gen_userinteraction_phf.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
from mozparsers.shared_telemetry_utils import ParserError
from perfecthash import PerfectHash
diff --git a/toolkit/components/telemetry/build_scripts/mozparsers/shared_telemetry_utils.py b/toolkit/components/telemetry/build_scripts/mozparsers/shared_telemetry_utils.py
index 6c26b4c22f31..bf4a1356f229 100644
--- a/toolkit/components/telemetry/build_scripts/mozparsers/shared_telemetry_utils.py
+++ b/toolkit/components/telemetry/build_scripts/mozparsers/shared_telemetry_utils.py
@@ -5,8 +5,6 @@
# This file contains utility functions shared by the scalars and the histogram generation
# scripts.
-from __future__ import print_function
-
import os
import re
import sys
diff --git a/toolkit/components/telemetry/tests/marionette/mach_commands.py b/toolkit/components/telemetry/tests/marionette/mach_commands.py
index 5c299683d497..07709f5304b3 100644
--- a/toolkit/components/telemetry/tests/marionette/mach_commands.py
+++ b/toolkit/components/telemetry/tests/marionette/mach_commands.py
@@ -1,7 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
import argparse
import logging
diff --git a/toolkit/content/neterror/gen_aboutneterror_codes.py b/toolkit/content/neterror/gen_aboutneterror_codes.py
index d2e601a503e0..806756422f74 100644
--- a/toolkit/content/neterror/gen_aboutneterror_codes.py
+++ b/toolkit/content/neterror/gen_aboutneterror_codes.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import sys
from fluent.syntax import parse
diff --git a/toolkit/crashreporter/tools/symbolstore.py b/toolkit/crashreporter/tools/symbolstore.py
index 4d8a4c183771..6826f4f17195 100755
--- a/toolkit/crashreporter/tools/symbolstore.py
+++ b/toolkit/crashreporter/tools/symbolstore.py
@@ -21,8 +21,6 @@
# -s : Use as the top source directory to
# generate relative filenames.
-from __future__ import print_function
-
import ctypes
import errno
import os
diff --git a/toolkit/crashreporter/tools/upload_symbols.py b/toolkit/crashreporter/tools/upload_symbols.py
index 71ecae1afa75..01e9aab9fb55 100644
--- a/toolkit/crashreporter/tools/upload_symbols.py
+++ b/toolkit/crashreporter/tools/upload_symbols.py
@@ -14,8 +14,6 @@
# you can put the token in a file and set `SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE`
# environment variable to the path to the file.
-from __future__ import absolute_import, print_function, unicode_literals
-
import argparse
import logging
import os
diff --git a/toolkit/locales/gen_multilocale.py b/toolkit/locales/gen_multilocale.py
index 14e8c80cb241..1d151b68bf7d 100644
--- a/toolkit/locales/gen_multilocale.py
+++ b/toolkit/locales/gen_multilocale.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function, unicode_literals
-
import sys
diff --git a/toolkit/locales/generate_update_locale.py b/toolkit/locales/generate_update_locale.py
index af00cef8c9da..30d492a27297 100644
--- a/toolkit/locales/generate_update_locale.py
+++ b/toolkit/locales/generate_update_locale.py
@@ -4,8 +4,6 @@
# Generate update.locale, which simply contains the name of the current locale.
-from __future__ import unicode_literals, print_function
-
def main(output, locale=None):
assert locale is not None
diff --git a/toolkit/mozapps/extensions/gen_built_in_addons.py b/toolkit/mozapps/extensions/gen_built_in_addons.py
index 3568afe1f693..9e8078f2bcea 100644
--- a/toolkit/mozapps/extensions/gen_built_in_addons.py
+++ b/toolkit/mozapps/extensions/gen_built_in_addons.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import argparse
import json
import os.path
diff --git a/toolkit/mozapps/installer/find-dupes.py b/toolkit/mozapps/installer/find-dupes.py
index 7c865079caed..1931481b7ca6 100644
--- a/toolkit/mozapps/installer/find-dupes.py
+++ b/toolkit/mozapps/installer/find-dupes.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, unicode_literals, print_function
-
import sys
import hashlib
import functools
diff --git a/toolkit/mozapps/installer/informulate.py b/toolkit/mozapps/installer/informulate.py
index 4cf1affc46d9..ec45e25f89a0 100644
--- a/toolkit/mozapps/installer/informulate.py
+++ b/toolkit/mozapps/installer/informulate.py
@@ -6,8 +6,6 @@
# Generate build info files for use by other tools.
# This script assumes it is being run in a Mozilla CI build.
-from __future__ import unicode_literals
-
from argparse import ArgumentParser
import datetime
import buildconfig
diff --git a/toolkit/mozapps/installer/packager.py b/toolkit/mozapps/installer/packager.py
index ec8d2de343c2..29364045ddca 100644
--- a/toolkit/mozapps/installer/packager.py
+++ b/toolkit/mozapps/installer/packager.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, unicode_literals, print_function
-
from mozpack.packager.formats import (
FlatFormatter,
JarFormatter,
diff --git a/toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py b/toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py
index e0035da2158a..245efc774dd1 100644
--- a/toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py
+++ b/toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py
@@ -9,8 +9,6 @@
# windows at all and mochitest has a test runner window that Firefox recognizes, but mustn't close
# during testing.
-from __future__ import absolute_import
-
from marionette_driver import Wait, errors
from marionette_harness import MarionetteTestCase
diff --git a/toolkit/mozapps/update/updater/gen_cert_header.py b/toolkit/mozapps/update/updater/gen_cert_header.py
index e01207dbcf21..da78cad674e2 100644
--- a/toolkit/mozapps/update/updater/gen_cert_header.py
+++ b/toolkit/mozapps/update/updater/gen_cert_header.py
@@ -2,7 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
import os
diff --git a/toolkit/xre/dllservices/mozglue/gen_dll_blocklist_defs.py b/toolkit/xre/dllservices/mozglue/gen_dll_blocklist_defs.py
index eaa84b829312..056db4d9951d 100644
--- a/toolkit/xre/dllservices/mozglue/gen_dll_blocklist_defs.py
+++ b/toolkit/xre/dllservices/mozglue/gen_dll_blocklist_defs.py
@@ -4,8 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import print_function
-
import os
from copy import deepcopy
from struct import unpack
diff --git a/toolkit/xre/test/marionette/test_fission_autostart.py b/toolkit/xre/test/marionette/test_fission_autostart.py
index 9b27009844ec..b830c0eacac8 100644
--- a/toolkit/xre/test/marionette/test_fission_autostart.py
+++ b/toolkit/xre/test/marionette/test_fission_autostart.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, print_function
-
from contextlib import contextmanager
from marionette_harness import MarionetteTestCase
diff --git a/toolkit/xre/test/marionette/test_win32k_enrollment.py b/toolkit/xre/test/marionette/test_win32k_enrollment.py
index 358fab276178..d09331319b7e 100644
--- a/toolkit/xre/test/marionette/test_win32k_enrollment.py
+++ b/toolkit/xre/test/marionette/test_win32k_enrollment.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, print_function
-
from contextlib import contextmanager
from marionette_harness import MarionetteTestCase
diff --git a/toolkit/xre/test/marionette/test_win32k_enrollment.template.py b/toolkit/xre/test/marionette/test_win32k_enrollment.template.py
index cac6e3e497c9..30dc7fed3360 100644
--- a/toolkit/xre/test/marionette/test_win32k_enrollment.template.py
+++ b/toolkit/xre/test/marionette/test_win32k_enrollment.template.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, print_function
-
from contextlib import contextmanager
from marionette_harness import MarionetteTestCase
diff --git a/tools/browsertime/mach_commands.py b/tools/browsertime/mach_commands.py
index 3caa13e5cde8..4850c82b75f7 100644
--- a/tools/browsertime/mach_commands.py
+++ b/tools/browsertime/mach_commands.py
@@ -28,8 +28,6 @@ To invoke browsertime, run
All arguments are passed through to browsertime.
"""
-from __future__ import absolute_import, print_function, unicode_literals
-
import argparse
import collections
import contextlib
diff --git a/tools/compare-locales/mach_commands.py b/tools/compare-locales/mach_commands.py
index ebd375290826..56d101467bda 100644
--- a/tools/compare-locales/mach_commands.py
+++ b/tools/compare-locales/mach_commands.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this,
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import argparse
import logging
import os
diff --git a/tools/crashreporter/system-symbols/mac/PackageSymbolDumper.py b/tools/crashreporter/system-symbols/mac/PackageSymbolDumper.py
index d9614c54aa1a..bfb3048d7c4a 100755
--- a/tools/crashreporter/system-symbols/mac/PackageSymbolDumper.py
+++ b/tools/crashreporter/system-symbols/mac/PackageSymbolDumper.py
@@ -39,8 +39,6 @@ Created on Apr 11, 2012
@author: mrmiller
"""
-from __future__ import absolute_import
-
import argparse
import concurrent.futures
import errno
diff --git a/tools/crashreporter/system-symbols/mac/get_update_packages.py b/tools/crashreporter/system-symbols/mac/get_update_packages.py
index 21a54b8d0489..3192fa3ef009 100644
--- a/tools/crashreporter/system-symbols/mac/get_update_packages.py
+++ b/tools/crashreporter/system-symbols/mac/get_update_packages.py
@@ -21,8 +21,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
-from __future__ import absolute_import
-
import argparse
import concurrent.futures
import logging
diff --git a/tools/crashreporter/system-symbols/mac/list-packages.py b/tools/crashreporter/system-symbols/mac/list-packages.py
index d6297df45e9f..444c27be9dd4 100755
--- a/tools/crashreporter/system-symbols/mac/list-packages.py
+++ b/tools/crashreporter/system-symbols/mac/list-packages.py
@@ -20,8 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
-from __future__ import absolute_import, print_function
-
import os
import sys
diff --git a/tools/crashreporter/system-symbols/mac/scrapesymbols/gathersymbols.py b/tools/crashreporter/system-symbols/mac/scrapesymbols/gathersymbols.py
index 0b54b673157d..70be2a62a753 100644
--- a/tools/crashreporter/system-symbols/mac/scrapesymbols/gathersymbols.py
+++ b/tools/crashreporter/system-symbols/mac/scrapesymbols/gathersymbols.py
@@ -2,8 +2,6 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
-from __future__ import absolute_import, print_function
-
import argparse
import concurrent.futures
import datetime
diff --git a/tools/crashreporter/system-symbols/win/scrape-report.py b/tools/crashreporter/system-symbols/win/scrape-report.py
index 16ba8bb638b9..9bc21801c3da 100644
--- a/tools/crashreporter/system-symbols/win/scrape-report.py
+++ b/tools/crashreporter/system-symbols/win/scrape-report.py
@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from __future__ import absolute_import
-
import csv
import json
import logging
diff --git a/tools/esmify/mach_commands.py b/tools/esmify/mach_commands.py
index 7707479e3714..59c0777a9ea7 100644
--- a/tools/esmify/mach_commands.py
+++ b/tools/esmify/mach_commands.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import json
import logging
import os
diff --git a/tools/fuzzing/smoke/js.py b/tools/fuzzing/smoke/js.py
index 3fd06ab584d3..d6ad08eb6a20 100755
--- a/tools/fuzzing/smoke/js.py
+++ b/tools/fuzzing/smoke/js.py
@@ -5,8 +5,6 @@
""" Hello I am a fake jsshell for testing purpose.
Add more features!
"""
-from __future__ import absolute_import
-
import argparse
import sys
diff --git a/tools/fuzzing/smoke/smoke.py b/tools/fuzzing/smoke/smoke.py
index 4c118f29ce1a..e328be71d6a0 100644
--- a/tools/fuzzing/smoke/smoke.py
+++ b/tools/fuzzing/smoke/smoke.py
@@ -15,8 +15,6 @@ Everything included in this directory will be added in
tools if you need. They will be located in `$MOZ_FETCHES_DIR` and follow the
same directory structure than the source tree.
"""
-from __future__ import absolute_import
-
import os
import os.path
import shlex
diff --git a/tools/fuzzing/smoke/tests.py b/tools/fuzzing/smoke/tests.py
index 913798cb180c..bc06e2427b8d 100644
--- a/tools/fuzzing/smoke/tests.py
+++ b/tools/fuzzing/smoke/tests.py
@@ -1,8 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import os
from contextlib import contextmanager
diff --git a/tools/jprof/split-profile.py b/tools/jprof/split-profile.py
index 1a73e5cfa49a..c280c130c23b 100755
--- a/tools/jprof/split-profile.py
+++ b/tools/jprof/split-profile.py
@@ -52,8 +52,6 @@
# functions in the input file can lead to a logical splitting of the
# profile into segments.
-from __future__ import absolute_import, print_function
-
import os.path
import subprocess
import sys
diff --git a/tools/lint/eslint/__init__.py b/tools/lint/eslint/__init__.py
index 071706e68843..af3f5efc56fd 100644
--- a/tools/lint/eslint/__init__.py
+++ b/tools/lint/eslint/__init__.py
@@ -4,8 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import json
import os
import signal
diff --git a/tools/lint/hooks.py b/tools/lint/hooks.py
index b46df7153659..fead62ec7e09 100755
--- a/tools/lint/hooks.py
+++ b/tools/lint/hooks.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import os
import signal
import subprocess
diff --git a/tools/lint/libpref/__init__.py b/tools/lint/libpref/__init__.py
index f59d3f11c38c..e986be39d093 100644
--- a/tools/lint/libpref/__init__.py
+++ b/tools/lint/libpref/__init__.py
@@ -4,8 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, division, print_function
-
import re
import sys
diff --git a/tools/lint/perfdocs/framework_gatherers.py b/tools/lint/perfdocs/framework_gatherers.py
index 37ea462e02e1..c85690879bef 100644
--- a/tools/lint/perfdocs/framework_gatherers.py
+++ b/tools/lint/perfdocs/framework_gatherers.py
@@ -1,8 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import json
import os
import pathlib
diff --git a/tools/lint/perfdocs/gatherer.py b/tools/lint/perfdocs/gatherer.py
index 0c403567d87a..02c13a103e48 100644
--- a/tools/lint/perfdocs/gatherer.py
+++ b/tools/lint/perfdocs/gatherer.py
@@ -1,8 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import os
import pathlib
diff --git a/tools/lint/perfdocs/generator.py b/tools/lint/perfdocs/generator.py
index cf49714f825e..3f3a0acefa68 100644
--- a/tools/lint/perfdocs/generator.py
+++ b/tools/lint/perfdocs/generator.py
@@ -1,8 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import pathlib
import re
import shutil
diff --git a/tools/lint/perfdocs/logger.py b/tools/lint/perfdocs/logger.py
index 2e1a66b717c5..6f0a482d159c 100644
--- a/tools/lint/perfdocs/logger.py
+++ b/tools/lint/perfdocs/logger.py
@@ -1,8 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import pathlib
diff --git a/tools/lint/perfdocs/perfdocs.py b/tools/lint/perfdocs/perfdocs.py
index 185fd0d915a7..b41edb1979c3 100644
--- a/tools/lint/perfdocs/perfdocs.py
+++ b/tools/lint/perfdocs/perfdocs.py
@@ -1,8 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import os
import pathlib
diff --git a/tools/lint/perfdocs/utils.py b/tools/lint/perfdocs/utils.py
index 68072c417999..3bf20d33cc48 100644
--- a/tools/lint/perfdocs/utils.py
+++ b/tools/lint/perfdocs/utils.py
@@ -1,8 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import difflib
import filecmp
import os
diff --git a/tools/lint/perfdocs/verifier.py b/tools/lint/perfdocs/verifier.py
index 373b452fad05..db6f849922fd 100644
--- a/tools/lint/perfdocs/verifier.py
+++ b/tools/lint/perfdocs/verifier.py
@@ -1,8 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import
-
import os
import pathlib
import re
diff --git a/tools/lint/python/black.py b/tools/lint/python/black.py
index e98cdc24d7b5..8c44a5695129 100644
--- a/tools/lint/python/black.py
+++ b/tools/lint/python/black.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import os
import platform
import re
diff --git a/tools/lint/test/conftest.py b/tools/lint/test/conftest.py
index eb76928aa588..ca5adab7aef2 100644
--- a/tools/lint/test/conftest.py
+++ b/tools/lint/test/conftest.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, print_function
-
import logging
import os
import pathlib
diff --git a/tools/lint/test/test_codespell.py b/tools/lint/test/test_codespell.py
index 7cf9a122410f..8baae66b418e 100644
--- a/tools/lint/test/test_codespell.py
+++ b/tools/lint/test/test_codespell.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, print_function
-
import mozunit
LINTER = "codespell"
diff --git a/tools/lint/test/test_file_license.py b/tools/lint/test/test_file_license.py
index b7f0efac6034..b00b023baee9 100644
--- a/tools/lint/test/test_file_license.py
+++ b/tools/lint/test/test_file_license.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, print_function
-
import mozunit
LINTER = "license"
diff --git a/tools/lint/test/test_file_perm.py b/tools/lint/test/test_file_perm.py
index a9f991eef2ce..08d6a20eef0a 100644
--- a/tools/lint/test/test_file_perm.py
+++ b/tools/lint/test/test_file_perm.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, print_function
-
import mozunit
import pytest
diff --git a/tools/lint/test/test_file_whitespace.py b/tools/lint/test/test_file_whitespace.py
index ae167999232f..51b6fc479529 100644
--- a/tools/lint/test/test_file_whitespace.py
+++ b/tools/lint/test/test_file_whitespace.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, print_function
-
import mozunit
LINTER = "file-whitespace"
diff --git a/tools/lint/test/test_lintpref.py b/tools/lint/test/test_lintpref.py
index 4fb3b8d23ce4..3e75b1675e49 100644
--- a/tools/lint/test/test_lintpref.py
+++ b/tools/lint/test/test_lintpref.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, print_function
-
import mozunit
LINTER = "lintpref"
diff --git a/tools/lint/test/test_trojan_source.py b/tools/lint/test/test_trojan_source.py
index 8a846ba1b859..64a3789c3765 100644
--- a/tools/lint/test/test_trojan_source.py
+++ b/tools/lint/test/test_trojan_source.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, print_function
-
import mozunit
LINTER = "trojan-source"
diff --git a/tools/mach_commands.py b/tools/mach_commands.py
index 9b19117e6a1c..50fdaf984937 100644
--- a/tools/mach_commands.py
+++ b/tools/mach_commands.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, # You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import argparse
import logging
import subprocess
diff --git a/tools/moztreedocs/__init__.py b/tools/moztreedocs/__init__.py
index e0aab86b8e94..7d13b4b63505 100644
--- a/tools/moztreedocs/__init__.py
+++ b/tools/moztreedocs/__init__.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, # You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import tempfile
from pathlib import PurePath
diff --git a/tools/moztreedocs/mach_commands.py b/tools/moztreedocs/mach_commands.py
index 32a2c8d5268c..737954f48660 100644
--- a/tools/moztreedocs/mach_commands.py
+++ b/tools/moztreedocs/mach_commands.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, # You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import fnmatch
import json
import multiprocessing
diff --git a/tools/moztreedocs/package.py b/tools/moztreedocs/package.py
index 9b4b20e22979..b8db23ee879b 100644
--- a/tools/moztreedocs/package.py
+++ b/tools/moztreedocs/package.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, # You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, unicode_literals
-
import os
from mozpack.archive import create_tar_gz_from_files
diff --git a/tools/moztreedocs/upload.py b/tools/moztreedocs/upload.py
index beb7c14640cd..ee98d8815b9d 100644
--- a/tools/moztreedocs/upload.py
+++ b/tools/moztreedocs/upload.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, # You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import concurrent.futures as futures
import io
import mimetypes
diff --git a/tools/phabricator/mach_commands.py b/tools/phabricator/mach_commands.py
index 6cdfd45d4007..811defb314dd 100644
--- a/tools/phabricator/mach_commands.py
+++ b/tools/phabricator/mach_commands.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, # You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, unicode_literals
-
import mozfile
from mach.decorators import Command, CommandArgument
from mach.site import MozSiteMetadata
diff --git a/tools/power/mach_commands.py b/tools/power/mach_commands.py
index 31bbf0ef3974..956dcdf440ea 100644
--- a/tools/power/mach_commands.py
+++ b/tools/power/mach_commands.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
from distutils.version import StrictVersion
from mach.decorators import Command, CommandArgument
diff --git a/tools/rb/find_leakers.py b/tools/rb/find_leakers.py
index 0359d6fefb5b..9e9a37ac69a9 100755
--- a/tools/rb/find_leakers.py
+++ b/tools/rb/find_leakers.py
@@ -9,8 +9,6 @@
# sees if they `Release' or `Dtor'. If not, it reports them as leaks.
# Please see README file in the same directory.
-from __future__ import absolute_import, print_function
-
import sys
import six
diff --git a/tools/rb/fix_stacks.py b/tools/rb/fix_stacks.py
index 5813363588ff..398041df1de5 100755
--- a/tools/rb/fix_stacks.py
+++ b/tools/rb/fix_stacks.py
@@ -7,8 +7,6 @@
# This script uses `fix-stacks` to post-process the entries produced by
# MozFormatCodeAddress().
-from __future__ import absolute_import, print_function
-
import atexit
import os
import platform
diff --git a/tools/tryselect/selectors/chooser/__init__.py b/tools/tryselect/selectors/chooser/__init__.py
index f9eac295cc5d..51263a184545 100644
--- a/tools/tryselect/selectors/chooser/__init__.py
+++ b/tools/tryselect/selectors/chooser/__init__.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import webbrowser
from threading import Timer
diff --git a/tools/tryselect/selectors/chooser/app.py b/tools/tryselect/selectors/chooser/app.py
index a1dfea498bb7..adbf6f33dd5a 100644
--- a/tools/tryselect/selectors/chooser/app.py
+++ b/tools/tryselect/selectors/chooser/app.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
from abc import ABCMeta, abstractproperty
from collections import defaultdict
diff --git a/tools/tryselect/test/conftest.py b/tools/tryselect/test/conftest.py
index 706b86d9b985..7ffffc4b9b0d 100644
--- a/tools/tryselect/test/conftest.py
+++ b/tools/tryselect/test/conftest.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
from unittest.mock import MagicMock
diff --git a/tools/tryselect/test/test_again.py b/tools/tryselect/test/test_again.py
index 68b04cc4e90d..0e5d9d6b6dcd 100644
--- a/tools/tryselect/test/test_again.py
+++ b/tools/tryselect/test/test_again.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import mozunit
diff --git a/tools/tryselect/test/test_auto.py b/tools/tryselect/test/test_auto.py
index cb0daf4252f6..63f0fe6bd724 100644
--- a/tools/tryselect/test/test_auto.py
+++ b/tools/tryselect/test/test_auto.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import mozunit
import pytest
from tryselect.selectors.auto import AutoParser
diff --git a/tools/tryselect/test/test_chooser.py b/tools/tryselect/test/test_chooser.py
index 615f8085243f..885ed41a787d 100644
--- a/tools/tryselect/test/test_chooser.py
+++ b/tools/tryselect/test/test_chooser.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import mozunit
import pytest
from tryselect.selectors.chooser.app import create_application
diff --git a/tools/tryselect/test/test_fuzzy.py b/tools/tryselect/test/test_fuzzy.py
index f88bd5c189fa..7391745bebda 100644
--- a/tools/tryselect/test/test_fuzzy.py
+++ b/tools/tryselect/test/test_fuzzy.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import os
import mozunit
diff --git a/tools/tryselect/test/test_mozharness_integration.py b/tools/tryselect/test/test_mozharness_integration.py
index 16cfc91d4e2d..b2585468f261 100644
--- a/tools/tryselect/test/test_mozharness_integration.py
+++ b/tools/tryselect/test/test_mozharness_integration.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import imp
import json
import os
diff --git a/tools/tryselect/test/test_presets.py b/tools/tryselect/test/test_presets.py
index 38e34e3bdcd0..89cc810808c2 100644
--- a/tools/tryselect/test/test_presets.py
+++ b/tools/tryselect/test/test_presets.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import mozunit
import pytest
diff --git a/tools/tryselect/test/test_task_configs.py b/tools/tryselect/test/test_task_configs.py
index 6883bd3e57e2..6c0eeadaa678 100644
--- a/tools/tryselect/test/test_task_configs.py
+++ b/tools/tryselect/test/test_task_configs.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function, unicode_literals
-
import inspect
import subprocess
from argparse import ArgumentParser
diff --git a/tools/update-verify/python/util/commands.py b/tools/update-verify/python/util/commands.py
index acc8de3626de..cb2b2119ff77 100644
--- a/tools/update-verify/python/util/commands.py
+++ b/tools/update-verify/python/util/commands.py
@@ -4,8 +4,6 @@
"""Functions for running commands"""
-from __future__ import absolute_import, print_function
-
import logging
import os
import subprocess
diff --git a/tools/update-verify/release/compare-directories.py b/tools/update-verify/release/compare-directories.py
index b5fd901965dc..f73bd55581d4 100755
--- a/tools/update-verify/release/compare-directories.py
+++ b/tools/update-verify/release/compare-directories.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import argparse
import difflib
import hashlib
diff --git a/tools/update-verify/release/replace-updater-certs.py b/tools/update-verify/release/replace-updater-certs.py
index 55b28de0e65c..9e981fbfe0b2 100644
--- a/tools/update-verify/release/replace-updater-certs.py
+++ b/tools/update-verify/release/replace-updater-certs.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import os.path
import sys
diff --git a/tools/update-verify/scripts/chunked-verify.py b/tools/update-verify/scripts/chunked-verify.py
index 3410a02f2461..8c4320d4ccfe 100644
--- a/tools/update-verify/scripts/chunked-verify.py
+++ b/tools/update-verify/scripts/chunked-verify.py
@@ -3,8 +3,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, print_function
-
import logging
import os
import sys
diff --git a/tools/vcs/mach_commands.py b/tools/vcs/mach_commands.py
index d773470bed64..4623a23634f0 100644
--- a/tools/vcs/mach_commands.py
+++ b/tools/vcs/mach_commands.py
@@ -2,8 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, # You can obtain one at http://mozilla.org/MPL/2.0/.
-from __future__ import absolute_import, unicode_literals
-
import json
import logging
import os
diff --git a/xpcom/base/ErrorList.py b/xpcom/base/ErrorList.py
index 2fd3b8b4b938..00d84f9aaaba 100755
--- a/xpcom/base/ErrorList.py
+++ b/xpcom/base/ErrorList.py
@@ -1,6 +1,4 @@
#!/usr/bin/env python
-from __future__ import absolute_import
-
from collections import OrderedDict
diff --git a/xpcom/idl-parser/xpidl/header.py b/xpcom/idl-parser/xpidl/header.py
index c8b51f60f700..4b547694154e 100644
--- a/xpcom/idl-parser/xpidl/header.py
+++ b/xpcom/idl-parser/xpidl/header.py
@@ -7,8 +7,6 @@
"""Print a C++ header file for the IDL files specified on the command line"""
-from __future__ import absolute_import
-
import itertools
import os.path
import re
diff --git a/xpcom/idl-parser/xpidl/jsonxpt.py b/xpcom/idl-parser/xpidl/jsonxpt.py
index 4b63d8ffb93e..342188f6451b 100644
--- a/xpcom/idl-parser/xpidl/jsonxpt.py
+++ b/xpcom/idl-parser/xpidl/jsonxpt.py
@@ -7,8 +7,6 @@
"""Generate a json XPT typelib for an IDL file"""
-from __future__ import absolute_import
-
import itertools
import json
diff --git a/xpcom/idl-parser/xpidl/runtests.py b/xpcom/idl-parser/xpidl/runtests.py
index aa610cfdffd1..f209b5483a15 100755
--- a/xpcom/idl-parser/xpidl/runtests.py
+++ b/xpcom/idl-parser/xpidl/runtests.py
@@ -5,8 +5,6 @@
#
# Unit tests for xpidl.py
-from __future__ import absolute_import
-
import sys
# Hack: the first entry in sys.path is the directory containing the script.
diff --git a/xpcom/idl-parser/xpidl/rust.py b/xpcom/idl-parser/xpidl/rust.py
index 1e35bf018715..7c19bd01f12c 100644
--- a/xpcom/idl-parser/xpidl/rust.py
+++ b/xpcom/idl-parser/xpidl/rust.py
@@ -34,8 +34,6 @@
# and when possible we should avoid doing so. We don't generate bindings for
# these methods here currently.
-from __future__ import absolute_import
-
import os.path
import re
diff --git a/xpcom/idl-parser/xpidl/rust_macros.py b/xpcom/idl-parser/xpidl/rust_macros.py
index 00ec506d7b0e..d610a08d312a 100644
--- a/xpcom/idl-parser/xpidl/rust_macros.py
+++ b/xpcom/idl-parser/xpidl/rust_macros.py
@@ -6,8 +6,6 @@
"""Generate rust bindings information for the IDL file specified"""
-from __future__ import absolute_import
-
from xpidl import rust, xpidl
derive_method_tmpl = """\
diff --git a/xpcom/idl-parser/xpidl/xpidl.py b/xpcom/idl-parser/xpidl/xpidl.py
index 0cd3e6da47f3..925d588dd558 100755
--- a/xpcom/idl-parser/xpidl/xpidl.py
+++ b/xpcom/idl-parser/xpidl/xpidl.py
@@ -7,8 +7,6 @@
"""A parser for cross-platform IDL (XPIDL) files."""
-from __future__ import absolute_import, print_function
-
import os.path
import re
import sys