Bug 1542963 - use print_function for mozbuild and mozpack. r=#build
☠☠ backed out by cd02c0486c2e ☠ ☠
authorJustin Wood <Callek@gmail.com>
Mon, 08 Apr 2019 10:29:43 -0400
changeset 474132 70fbe1a158ae2cc7a6730ba47a04b426ab803f0a
parent 474131 a1a84e0feabbaf28257547dfecec84ddd72f0b61
child 474133 5f3c10562df335827c80fd866a1eba8f256540d2
push id36023
push userncsoregi@mozilla.com
push dateThu, 16 May 2019 21:56:43 +0000
treeherdermozilla-central@786f094a30ae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1542963
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1542963 - use print_function for mozbuild and mozpack. r=#build Lint python/mozbuild/{mozbuild,mozpack}. Differential Revision: https://phabricator.services.mozilla.com/D26644
python/mozbuild/mozbuild/action/download_wpt_manifest.py
python/mozbuild/mozbuild/action/dump_env.py
python/mozbuild/mozbuild/action/generate_searchjson.py
python/mozbuild/mozbuild/action/generate_strings_xml.py
python/mozbuild/mozbuild/action/jar_maker.py
python/mozbuild/mozbuild/action/langpack_manifest.py
python/mozbuild/mozbuild/action/output_searchplugins_list.py
python/mozbuild/mozbuild/action/preprocessor.py
python/mozbuild/mozbuild/action/tooltool.py
python/mozbuild/mozbuild/action/webidl.py
python/mozbuild/mozbuild/action/xpccheck.py
python/mozbuild/mozbuild/action/xpidl-process.py
python/mozbuild/mozbuild/action/zip.py
python/mozbuild/mozbuild/analyze/graph.py
python/mozbuild/mozbuild/analyze/hg.py
python/mozbuild/mozbuild/artifact_builds.py
python/mozbuild/mozbuild/backend/__init__.py
python/mozbuild/mozbuild/backend/base.py
python/mozbuild/mozbuild/backend/cargo_build_defs.py
python/mozbuild/mozbuild/backend/common.py
python/mozbuild/mozbuild/backend/configenvironment.py
python/mozbuild/mozbuild/backend/cpp_eclipse.py
python/mozbuild/mozbuild/backend/recursivemake.py
python/mozbuild/mozbuild/backend/test_manifest.py
python/mozbuild/mozbuild/backend/tup.py
python/mozbuild/mozbuild/backend/visualstudio.py
python/mozbuild/mozbuild/chunkify.py
python/mozbuild/mozbuild/codecoverage/chrome_map.py
python/mozbuild/mozbuild/codecoverage/lcov_rewriter.py
python/mozbuild/mozbuild/codecoverage/manifest_handler.py
python/mozbuild/mozbuild/compilation/codecomplete.py
python/mozbuild/mozbuild/compilation/database.py
python/mozbuild/mozbuild/compilation/util.py
python/mozbuild/mozbuild/compilation/warnings.py
python/mozbuild/mozbuild/configure/check_debug_ranges.py
python/mozbuild/mozbuild/configure/libstdcxx.py
python/mozbuild/mozbuild/controller/building.py
python/mozbuild/mozbuild/doctor.py
python/mozbuild/mozbuild/dotproperties.py
python/mozbuild/mozbuild/frontend/context.py
python/mozbuild/mozbuild/frontend/data.py
python/mozbuild/mozbuild/frontend/emitter.py
python/mozbuild/mozbuild/frontend/gyp_reader.py
python/mozbuild/mozbuild/frontend/sandbox.py
python/mozbuild/mozbuild/gen_test_backend.py
python/mozbuild/mozbuild/generated_sources.py
python/mozbuild/mozbuild/html_build_viewer.py
python/mozbuild/mozbuild/jar.py
python/mozbuild/mozbuild/makeutil.py
python/mozbuild/mozbuild/mozconfig.py
python/mozbuild/mozbuild/mozinfo.py
python/mozbuild/mozbuild/nodeutil.py
python/mozbuild/mozbuild/preprocessor.py
python/mozbuild/mozbuild/pythonutil.py
python/mozbuild/mozbuild/repackaging/application_ini.py
python/mozbuild/mozbuild/repackaging/dmg.py
python/mozbuild/mozbuild/repackaging/installer.py
python/mozbuild/mozbuild/repackaging/mar.py
python/mozbuild/mozbuild/repackaging/msi.py
python/mozbuild/mozbuild/shellutil.py
python/mozbuild/mozbuild/sphinx.py
python/mozbuild/mozbuild/test/action/test_buildlist.py
python/mozbuild/mozbuild/test/action/test_langpack_manifest.py
python/mozbuild/mozbuild/test/action/test_package_fennec_apk.py
python/mozbuild/mozbuild/test/action/test_process_install_manifest.py
python/mozbuild/mozbuild/test/analyze/test_graph.py
python/mozbuild/mozbuild/test/backend/common.py
python/mozbuild/mozbuild/test/backend/test_configenvironment.py
python/mozbuild/mozbuild/test/backend/test_fastermake.py
python/mozbuild/mozbuild/test/backend/test_gn_processor.py
python/mozbuild/mozbuild/test/backend/test_partialconfigenvironment.py
python/mozbuild/mozbuild/test/backend/test_recursivemake.py
python/mozbuild/mozbuild/test/backend/test_test_manifest.py
python/mozbuild/mozbuild/test/backend/test_visualstudio.py
python/mozbuild/mozbuild/test/codecoverage/test_lcov_rewrite.py
python/mozbuild/mozbuild/test/common.py
python/mozbuild/mozbuild/test/compilation/test_warnings.py
python/mozbuild/mozbuild/test/controller/test_ccachestats.py
python/mozbuild/mozbuild/test/controller/test_clobber.py
python/mozbuild/mozbuild/test/frontend/test_context.py
python/mozbuild/mozbuild/test/frontend/test_emitter.py
python/mozbuild/mozbuild/test/frontend/test_namespaces.py
python/mozbuild/mozbuild/test/frontend/test_reader.py
python/mozbuild/mozbuild/test/frontend/test_sandbox.py
python/mozbuild/mozbuild/test/test_android_version_code.py
python/mozbuild/mozbuild/test/test_artifact_cache.py
python/mozbuild/mozbuild/test/test_base.py
python/mozbuild/mozbuild/test/test_containers.py
python/mozbuild/mozbuild/test/test_dotproperties.py
python/mozbuild/mozbuild/test/test_expression.py
python/mozbuild/mozbuild/test/test_licenses.py
python/mozbuild/mozbuild/test/test_line_endings.py
python/mozbuild/mozbuild/test/test_makeutil.py
python/mozbuild/mozbuild/test/test_manifest.py
python/mozbuild/mozbuild/test/test_mozconfig.py
python/mozbuild/mozbuild/test/test_mozinfo.py
python/mozbuild/mozbuild/test/test_preprocessor.py
python/mozbuild/mozbuild/test/test_pythonutil.py
python/mozbuild/mozbuild/test/test_util.py
python/mozbuild/mozbuild/testing.py
python/mozbuild/mozpack/archive.py
python/mozbuild/mozpack/chrome/flags.py
python/mozbuild/mozpack/chrome/manifest.py
python/mozbuild/mozpack/copier.py
python/mozbuild/mozpack/dmg.py
python/mozbuild/mozpack/errors.py
python/mozbuild/mozpack/executables.py
python/mozbuild/mozpack/files.py
python/mozbuild/mozpack/hg.py
python/mozbuild/mozpack/manifests.py
python/mozbuild/mozpack/mozjar.py
python/mozbuild/mozpack/packager/__init__.py
python/mozbuild/mozpack/packager/formats.py
python/mozbuild/mozpack/packager/l10n.py
python/mozbuild/mozpack/packager/unpack.py
python/mozbuild/mozpack/path.py
python/mozbuild/mozpack/test/test_archive.py
python/mozbuild/mozpack/test/test_chrome_flags.py
python/mozbuild/mozpack/test/test_chrome_manifest.py
python/mozbuild/mozpack/test/test_copier.py
python/mozbuild/mozpack/test/test_errors.py
python/mozbuild/mozpack/test/test_files.py
python/mozbuild/mozpack/test/test_manifests.py
python/mozbuild/mozpack/test/test_mozjar.py
python/mozbuild/mozpack/test/test_packager.py
python/mozbuild/mozpack/test/test_packager_formats.py
python/mozbuild/mozpack/test/test_packager_l10n.py
python/mozbuild/mozpack/test/test_packager_unpack.py
python/mozbuild/mozpack/test/test_path.py
--- a/python/mozbuild/mozbuild/action/download_wpt_manifest.py
+++ b/python/mozbuild/mozbuild/action/download_wpt_manifest.py
@@ -1,15 +1,15 @@
 # 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/.
 
 # This action is used to generate the wpt manifest
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import sys
 
 import buildconfig
 
 
 def main():
     print("Downloading wpt manifest")
--- a/python/mozbuild/mozbuild/action/dump_env.py
+++ b/python/mozbuild/mozbuild/action/dump_env.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 # We invoke a Python program to dump our environment in order to get
 # native paths printed on Windows so that these paths can be incorporated
 # into Python configure's environment.
 import os
 import sys
 
 sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
--- a/python/mozbuild/mozbuild/action/generate_searchjson.py
+++ b/python/mozbuild/mozbuild/action/generate_searchjson.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import sys
 import json
 import copy
 
 engines = []
 
 locale = sys.argv[2]
@@ -23,17 +23,17 @@ if locale in searchinfo["locales"]:
     localeSearchInfo = searchinfo["locales"][locale]
 else:
     localeSearchInfo = {}
     localeSearchInfo["default"] = searchinfo["default"]
 
 
 def validateDefault(key):
     if key not in searchinfo["default"]:
-        print >>sys.stderr, "Error: Missing default %s in list.json" % (key)
+        print("Error: Missing default %s in list.json" % (key), file=sys.stderr)
         sys.exit(1)
 
 
 validateDefault("searchDefault")
 validateDefault("visibleDefaultEngines")
 
 # If the selected locale doesn't have a searchDefault,
 # use the global one.
--- a/python/mozbuild/mozbuild/action/generate_strings_xml.py
+++ b/python/mozbuild/mozbuild/action/generate_strings_xml.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import sys
 
 import buildconfig
 
 from mozbuild import preprocessor
 
 
--- a/python/mozbuild/mozbuild/action/jar_maker.py
+++ b/python/mozbuild/mozbuild/action/jar_maker.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import sys
 
 import mozbuild.jar
 
 
 def main(args):
     return mozbuild.jar.main(args)
--- a/python/mozbuild/mozbuild/action/langpack_manifest.py
+++ b/python/mozbuild/mozbuild/action/langpack_manifest.py
@@ -3,17 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 ###
 # This script generates a web manifest JSON file based on the xpi-stage
 # directory structure. It extracts the data from defines.inc files from
 # the locale directory, chrome registry entries and other information
 # necessary to produce the complete manifest file for a language pack.
 ###
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import argparse
 import sys
 import os
 import json
 import io
 import datetime
 import requests
@@ -302,17 +302,17 @@ def parse_chrome_manifest(path, base_pat
 # Returns:
 #    str - Version to use, may include buildid
 #
 ###
 def get_version_maybe_buildid(min_version):
     version = str(min_version)
     buildid = os.environ.get('MOZ_BUILD_DATE')
     if buildid and len(buildid) != 14:
-        print >>sys.stderr, 'Ignoring invalid MOZ_BUILD_DATE: %s' % buildid
+        print('Ignoring invalid MOZ_BUILD_DATE: %s' % buildid, file=sys.stderr)
         buildid = None
     if buildid:
         version = version + "buildid" + buildid
     return version
 
 
 ###
 # Generates a new web manifest dict with values specific for a language pack.
--- a/python/mozbuild/mozbuild/action/output_searchplugins_list.py
+++ b/python/mozbuild/mozbuild/action/output_searchplugins_list.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import sys
 import json
 
 engines = []
 
 locale = sys.argv[2]
 
--- a/python/mozbuild/mozbuild/action/preprocessor.py
+++ b/python/mozbuild/mozbuild/action/preprocessor.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import sys
 
 from mozbuild.preprocessor import Preprocessor
 
 
 def generate(output, *args):
     pp = Preprocessor()
--- a/python/mozbuild/mozbuild/action/tooltool.py
+++ b/python/mozbuild/mozbuild/action/tooltool.py
@@ -12,17 +12,17 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301, USA.
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 # A manifest file specifies files in that directory that are stored
 # elsewhere. This file should only list files in the same directory
 # in which the manifest file resides and it should be called
 # 'manifest.tt'
 
 from __future__ import print_function
 
--- a/python/mozbuild/mozbuild/action/webidl.py
+++ b/python/mozbuild/mozbuild/action/webidl.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import sys
 
 from mozwebidlcodegen import BuildSystemWebIDL
 
 
 def main(argv):
     """Perform WebIDL code generation required by the build system."""
--- a/python/mozbuild/mozbuild/action/xpccheck.py
+++ b/python/mozbuild/mozbuild/action/xpccheck.py
@@ -3,17 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 '''A generic script to verify all test files are in the
 corresponding .ini file.
 
 Usage: xpccheck.py <directory> [<directory> ...]
 '''
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import sys
 import os
 from glob import glob
 import manifestparser
 
 
 def getIniTests(testdir):
@@ -37,21 +37,23 @@ def verifyDirectory(initests, directory)
 
         found = False
         for test in initests:
             if os.path.join(os.path.abspath(directory), name) == test['path']:
                 found = True
                 break
 
         if not found:
-            print >>sys.stderr, ("TEST-UNEXPECTED-FAIL | xpccheck | test "
-                                 "%s is missing from test manifest %s!") % (
-                name,
-                os.path.join(directory, 'xpcshell.ini'),
-            )
+            print(('TEST-UNEXPECTED-FAIL | xpccheck | test '
+                   '%s is missing from test manifest %s!') % (
+                    name,
+                    os.path.join(directory, 'xpcshell.ini'),
+                    ),
+                  file=sys.stderr,
+                  )
             sys.exit(1)
 
 
 def verifyIniFile(initests, directory):
     files = glob(os.path.join(os.path.abspath(directory), "test_*"))
     for test in initests:
         name = test['path'].split('/')[-1]
 
@@ -62,25 +64,30 @@ def verifyIniFile(initests, directory):
             if fname.endswith('.in'):
                 fname = '.in'.join(fname.split('.in')[:-1])
 
             if os.path.join(os.path.abspath(directory), fname) == test['path']:
                 found = True
                 break
 
         if not found:
-            print >>sys.stderr, ("TEST-UNEXPECTED-FAIL | xpccheck | found "
-                                 "%s in xpcshell.ini and not in directory '%s'"
-                                 ) % (name, directory)
+            print(("TEST-UNEXPECTED-FAIL | xpccheck | found "
+                   "%s in xpcshell.ini and not in directory '%s'") % (
+                    name,
+                    directory,
+                    ),
+                  file=sys.stderr,
+                  )
             sys.exit(1)
 
 
 def main(argv):
     if len(argv) < 2:
-        print >>sys.stderr, "Usage: xpccheck.py <topsrcdir> <directory> [<directory> ...]"
+        print("Usage: xpccheck.py <topsrcdir> <directory> [<directory> ...]",
+              file=sys.stderr)
         sys.exit(1)
 
     for d in argv[1:]:
         # xpcshell-unpack is a copy of xpcshell sibling directory and in the Makefile
         # we copy all files (including xpcshell.ini from the sibling directory.
         if d.endswith('toolkit/mozapps/extensions/test/xpcshell-unpack'):
             continue
 
--- a/python/mozbuild/mozbuild/action/xpidl-process.py
+++ b/python/mozbuild/mozbuild/action/xpidl-process.py
@@ -2,17 +2,17 @@
 # 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/.
 
 # This script is used to generate an output header and xpt file for
 # input IDL file(s). It's purpose is to directly support the build
 # system. The API will change to meet the needs of the build system.
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import argparse
 import os
 import sys
 
 from xpidl import jsonxpt
 from buildconfig import topsrcdir
 from xpidl.header import print_header
--- a/python/mozbuild/mozbuild/action/zip.py
+++ b/python/mozbuild/mozbuild/action/zip.py
@@ -1,16 +1,16 @@
 # 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/.
 
 # This script creates a zip file, but will also strip any binaries
 # it finds before adding them to the zip.
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 from mozpack.files import FileFinder
 from mozpack.copier import Jarrer
 from mozpack.errors import errors
 from mozpack.path import match
 
 import argparse
 import mozpack.path as mozpath
--- a/python/mozbuild/mozbuild/analyze/graph.py
+++ b/python/mozbuild/mozbuild/analyze/graph.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 import sqlite3 as lite
 
 
 class Node(object):
 
     def __init__(self, graph, node_id):
--- a/python/mozbuild/mozbuild/analyze/hg.py
+++ b/python/mozbuild/mozbuild/analyze/hg.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import bisect
 import gzip
 import json
 import math
 import requests
 
 from datetime import datetime, timedelta
--- a/python/mozbuild/mozbuild/artifact_builds.py
+++ b/python/mozbuild/mozbuild/artifact_builds.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 # The values correspond to entries at
 # https://tools.taskcluster.net/index/artifacts/#gecko.v2.mozilla-central.latest/gecko.v2.mozilla-central.latest
 JOB_CHOICES = {
     'android-api-16-opt',
     'android-api-16-debug',
     'android-x86-opt',
     'android-x86_64-opt',
--- a/python/mozbuild/mozbuild/backend/__init__.py
+++ b/python/mozbuild/mozbuild/backend/__init__.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 backends = {
     'ChromeMap': 'mozbuild.codecoverage.chrome_map',
     'CompileDB': 'mozbuild.compilation.database',
     'CppEclipse': 'mozbuild.backend.cpp_eclipse',
     'FasterMake': 'mozbuild.backend.fastermake',
     'FasterMake+RecursiveMake': None,
     'GnConfigGen': 'mozbuild.gn_processor',
--- a/python/mozbuild/mozbuild/backend/base.py
+++ b/python/mozbuild/mozbuild/backend/base.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 from abc import (
     ABCMeta,
     abstractmethod,
 )
 
 import errno
 import itertools
--- a/python/mozbuild/mozbuild/backend/cargo_build_defs.py
+++ b/python/mozbuild/mozbuild/backend/cargo_build_defs.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 cargo_extra_outputs = {
     'bindgen': [
         'tests.rs',
         'host-target.txt',
     ],
     'cssparser': [
         'tokenizer.rs',
--- a/python/mozbuild/mozbuild/backend/common.py
+++ b/python/mozbuild/mozbuild/backend/common.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import itertools
 import json
 import os
 
 from collections import defaultdict
 
 import mozpack.path as mozpath
--- a/python/mozbuild/mozbuild/backend/configenvironment.py
+++ b/python/mozbuild/mozbuild/backend/configenvironment.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 import sys
 import json
 
 from collections import Iterable, OrderedDict
 from types import StringTypes, ModuleType
 
--- a/python/mozbuild/mozbuild/backend/cpp_eclipse.py
+++ b/python/mozbuild/mozbuild/backend/cpp_eclipse.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import errno
 import glob
 import os
 import shutil
 import subprocess
 from xml.sax.saxutils import quoteattr
 from .common import CommonBackend
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import logging
 import os
 import re
 
 from collections import (
     defaultdict,
     namedtuple,
--- a/python/mozbuild/mozbuild/backend/test_manifest.py
+++ b/python/mozbuild/mozbuild/backend/test_manifest.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import cPickle as pickle
 from collections import defaultdict
 
 import mozpack.path as mozpath
 
 from mozbuild.backend.base import PartialBackend
 from mozbuild.frontend.data import TestManifest
--- a/python/mozbuild/mozbuild/backend/tup.py
+++ b/python/mozbuild/mozbuild/backend/tup.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import os
 import gzip
 import itertools
 import json
 import sys
 import shutil
 
--- a/python/mozbuild/mozbuild/backend/visualstudio.py
+++ b/python/mozbuild/mozbuild/backend/visualstudio.py
@@ -1,16 +1,16 @@
 # 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/.
 
 # This file contains a build backend for generating Visual Studio project
 # files.
 
-from __future__ import absolute_import, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import errno
 import os
 import re
 import uuid
 
 from xml.dom import getDOMImplementation
 
--- a/python/mozbuild/mozbuild/chunkify.py
+++ b/python/mozbuild/mozbuild/chunkify.py
@@ -2,17 +2,17 @@
 # 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/.
 
 # This file is a direct clone of
 # https://github.com/bhearsum/chunkify/blob/master/chunkify/__init__.py
 # of version 1.2. Its license (MPL2) is contained in repo root LICENSE file.
 # Please make modifications there where possible.
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 from itertools import islice
 
 
 class ChunkingError(Exception):
     pass
 
 
--- a/python/mozbuild/mozbuild/codecoverage/chrome_map.py
+++ b/python/mozbuild/mozbuild/codecoverage/chrome_map.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import json
 import os
 import re
 
 from mach.config import ConfigSettings
 from mach.logging import LoggingManager
 from mozbuild.backend.common import CommonBackend
--- a/python/mozbuild/mozbuild/codecoverage/lcov_rewriter.py
+++ b/python/mozbuild/mozbuild/codecoverage/lcov_rewriter.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 from argparse import ArgumentParser
 import json
 import os
 
 try:
     import urlparse
 except ImportError:
--- a/python/mozbuild/mozbuild/codecoverage/manifest_handler.py
+++ b/python/mozbuild/mozbuild/codecoverage/manifest_handler.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 from collections import defaultdict
 
 try:
     import urlparse
 except ImportError:
     import urllib.parse as urlparse
 
--- a/python/mozbuild/mozbuild/compilation/codecomplete.py
+++ b/python/mozbuild/mozbuild/compilation/codecomplete.py
@@ -1,15 +1,15 @@
 # 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/.
 
 # This modules provides functionality for dealing with code completion.
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 from mach.decorators import (
     CommandArgument,
     CommandProvider,
     Command,
 )
 
 from mozbuild.base import MachCommandBase
--- a/python/mozbuild/mozbuild/compilation/database.py
+++ b/python/mozbuild/mozbuild/compilation/database.py
@@ -1,15 +1,15 @@
 # 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/.
 
 # This modules provides functionality for dealing with code completion.
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import os
 import types
 
 from mozbuild.backend.common import CommonBackend
 from mozbuild.frontend.data import (
     ComputedFlags,
     Sources,
--- a/python/mozbuild/mozbuild/compilation/util.py
+++ b/python/mozbuild/mozbuild/compilation/util.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 
 
 def check_top_objdir(topobjdir):
     top_make = os.path.join(topobjdir, 'Makefile')
     if not os.path.exists(top_make):
         print('Your tree has not been built yet. Please run '
--- a/python/mozbuild/mozbuild/compilation/warnings.py
+++ b/python/mozbuild/mozbuild/compilation/warnings.py
@@ -1,15 +1,15 @@
 # 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/.
 
 # This modules provides functionality for dealing with compiler warnings.
 
-from __future__ import absolute_import, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import errno
 import json
 import os
 import re
 
 from mozbuild.util import hash_file
 import mozpack.path as mozpath
--- a/python/mozbuild/mozbuild/configure/check_debug_ranges.py
+++ b/python/mozbuild/mozbuild/configure/check_debug_ranges.py
@@ -1,17 +1,17 @@
 # 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/.
 
 # This script returns the number of items for the DW_AT_ranges corresponding
 # to a given compilation unit. This is used as a helper to find a bug in some
 # versions of GNU ld.
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import subprocess
 import sys
 import re
 
 
 def get_range_for(compilation_unit, debug_info):
     '''Returns the range offset for a given compilation unit
--- a/python/mozbuild/mozbuild/configure/libstdcxx.py
+++ b/python/mozbuild/mozbuild/configure/libstdcxx.py
@@ -8,17 +8,17 @@
 # with 8 bits per element. For example, GLIBCXX_3.4.10 becomes
 # 3 << 16 | 4 << 8 | 10 = 197642. This format is easy to use
 # in the C preprocessor.
 
 # We find out both the host and target versions. Since the output
 # will be used from shell, we just print the two assignments and evaluate
 # them from shell.
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import os
 import subprocess
 import re
 
 re_for_ld = re.compile('.*\((.*)\).*')
 
 
--- a/python/mozbuild/mozbuild/controller/building.py
+++ b/python/mozbuild/mozbuild/controller/building.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import errno
 import getpass
 import io
 import json
 import logging
 import os
 import subprocess
--- a/python/mozbuild/mozbuild/doctor.py
+++ b/python/mozbuild/mozbuild/doctor.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 import subprocess
 import sys
 
 import psutil
 
 from distutils.util import strtobool
--- a/python/mozbuild/mozbuild/dotproperties.py
+++ b/python/mozbuild/mozbuild/dotproperties.py
@@ -1,16 +1,16 @@
 # 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/.
 
 # This file contains utility functions for reading .properties files, like
 # region.properties.
 
-from __future__ import absolute_import, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import codecs
 import re
 import sys
 
 if sys.version_info[0] == 3:
     str_type = str
 else:
--- a/python/mozbuild/mozbuild/frontend/context.py
+++ b/python/mozbuild/mozbuild/frontend/context.py
@@ -9,17 +9,17 @@
 r"""This module contains the data structure (context) holding the configuration
 from a moz.build. The data emitted by the frontend derives from those contexts.
 
 It also defines the set of variables and functions available in moz.build.
 If you are looking for the absolute authority on what moz.build files can
 contain, you've come to the right place.
 """
 
-from __future__ import absolute_import, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import os
 
 from collections import (
     Counter,
     OrderedDict,
 )
 from mozbuild.util import (
--- a/python/mozbuild/mozbuild/frontend/data.py
+++ b/python/mozbuild/mozbuild/frontend/data.py
@@ -10,17 +10,17 @@ structures are defined in this module.
 All data structures of interest are children of the TreeMetadata class.
 
 Logic for populating these data structures is not defined in this class.
 Instead, what we have here are dumb container classes. The emitter module
 contains the code for converting executed mozbuild files into these data
 structures.
 """
 
-from __future__ import absolute_import, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 from mozbuild.frontend.context import (
     ObjDirPath,
     SourcePath,
 )
 from mozpack.chrome.manifest import ManifestEntry
 
 import mozpack.path as mozpath
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import itertools
 import logging
 import os
 import traceback
 import sys
 import time
 
--- a/python/mozbuild/mozbuild/frontend/gyp_reader.py
+++ b/python/mozbuild/mozbuild/frontend/gyp_reader.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import gyp
 import gyp.msvs_emulation
 import sys
 import os
 import time
 import types
 
--- a/python/mozbuild/mozbuild/frontend/sandbox.py
+++ b/python/mozbuild/mozbuild/frontend/sandbox.py
@@ -12,17 +12,17 @@ code and is used to fill a Context insta
 the execution.
 
 Code in this module takes a different approach to exception handling compared
 to what you'd see elsewhere in Python. Arguments to built-in exceptions like
 KeyError are machine parseable. This machine-friendly data is used to present
 user-friendly error messages in the case of errors.
 """
 
-from __future__ import absolute_import, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import os
 import sys
 import weakref
 
 from mozbuild.util import (
     exec_,
     ReadOnlyDict,
--- a/python/mozbuild/mozbuild/gen_test_backend.py
+++ b/python/mozbuild/mozbuild/gen_test_backend.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import sys
 
 from mozbuild.backend.test_manifest import TestManifestBackend
 from mozbuild.base import BuildEnvironmentNotFoundException, MozbuildObject
 from mozbuild.frontend.emitter import TreeMetadataEmitter
 from mozbuild.frontend.reader import BuildReader, EmptyConfig
 import mozpack.path as mozpath
--- a/python/mozbuild/mozbuild/generated_sources.py
+++ b/python/mozbuild/mozbuild/generated_sources.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import hashlib
 import json
 import os
 
 from mozpack.files import FileFinder
 import mozpack.path as mozpath
 
--- a/python/mozbuild/mozbuild/html_build_viewer.py
+++ b/python/mozbuild/mozbuild/html_build_viewer.py
@@ -1,15 +1,15 @@
 # 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/.
 
 # This module contains code for running an HTTP server to view build info.
 
-from __future__ import absolute_import, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import BaseHTTPServer
 import json
 import os
 
 import requests
 
 
--- a/python/mozbuild/mozbuild/jar.py
+++ b/python/mozbuild/mozbuild/jar.py
@@ -3,17 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 '''jarmaker.py provides a python class to package up chrome content by
 processing jar.mn files.
 
 See the documentation for jar.mn on MDC for further details on the format.
 '''
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import sys
 import os
 import errno
 import re
 import logging
 from time import localtime
 from MozZipFile import ZipFile
--- a/python/mozbuild/mozbuild/makeutil.py
+++ b/python/mozbuild/mozbuild/makeutil.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 import re
 from types import StringTypes
 from collections import Iterable
 
 
 class Makefile(object):
--- a/python/mozbuild/mozbuild/mozconfig.py
+++ b/python/mozbuild/mozbuild/mozconfig.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import filecmp
 import os
 import re
 import sys
 import subprocess
 import traceback
 
--- a/python/mozbuild/mozbuild/mozinfo.py
+++ b/python/mozbuild/mozbuild/mozinfo.py
@@ -1,16 +1,16 @@
 # 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/.
 
 # This module produces a JSON file that provides basic build info and
 # configuration metadata.
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import os
 import re
 import json
 
 
 def build_dict(config, env=os.environ):
     """
--- a/python/mozbuild/mozbuild/nodeutil.py
+++ b/python/mozbuild/mozbuild/nodeutil.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 import subprocess
 import platform
 from mozboot.util import get_state_dir
 import which
 
 from distutils.version import (
--- a/python/mozbuild/mozbuild/preprocessor.py
+++ b/python/mozbuild/mozbuild/preprocessor.py
@@ -17,17 +17,17 @@ test:
 unary :
   '!'? value ;
 value :
   [0-9]+ # integer
   | 'defined(' \w+ ')'
   | \w+  # string identifier or value;
 """
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import sys
 import os
 import re
 from optparse import OptionParser
 import errno
 from mozbuild.makeutil import Makefile
 
--- a/python/mozbuild/mozbuild/pythonutil.py
+++ b/python/mozbuild/mozbuild/pythonutil.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 import subprocess
 import sys
 
 from distutils.version import (
     StrictVersion,
 )
--- a/python/mozbuild/mozbuild/repackaging/application_ini.py
+++ b/python/mozbuild/mozbuild/repackaging/application_ini.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 import ConfigParser
 import mozpack.path as mozpath
 
 
 def get_application_ini_value(application_directory, section, value,
                               fallback=None):
--- a/python/mozbuild/mozbuild/repackaging/dmg.py
+++ b/python/mozbuild/mozbuild/repackaging/dmg.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import errno
 import os
 import tempfile
 import tarfile
 import shutil
 import mozpack.path as mozpath
 from mozpack.dmg import create_dmg
--- a/python/mozbuild/mozbuild/repackaging/installer.py
+++ b/python/mozbuild/mozbuild/repackaging/installer.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 import tempfile
 import shutil
 import zipfile
 import mozpack.path as mozpath
 from mozbuild.action.exe_7z_archive import archive_exe
 from mozbuild.util import ensureParentDir
--- a/python/mozbuild/mozbuild/repackaging/mar.py
+++ b/python/mozbuild/mozbuild/repackaging/mar.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 import sys
 import tempfile
 import shutil
 import zipfile
 import tarfile
 import subprocess
--- a/python/mozbuild/mozbuild/repackaging/msi.py
+++ b/python/mozbuild/mozbuild/repackaging/msi.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 import tempfile
 import shutil
 import mozpack.path as mozpath
 import sys
 import subprocess
 from xml.dom import minidom
--- a/python/mozbuild/mozbuild/shellutil.py
+++ b/python/mozbuild/mozbuild/shellutil.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import re
 
 
 def _tokens2re(**tokens):
     # Create a pattern for non-escaped tokens, in the form:
     #   (?<!\\)(?:a|b|c...)
     # This is meant to match patterns a, b, or c, or ... if they are not
--- a/python/mozbuild/mozbuild/sphinx.py
+++ b/python/mozbuild/mozbuild/sphinx.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import importlib
 import os
 import sys
 
 from docutils.parsers.rst import Directive
 from sphinx.util.docstrings import prepare_docstring
 
--- a/python/mozbuild/mozbuild/test/action/test_buildlist.py
+++ b/python/mozbuild/mozbuild/test/action/test_buildlist.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import unittest
 
 import os
 import os.path
 from tempfile import mkdtemp
 from shutil import rmtree
 import mozunit
--- a/python/mozbuild/mozbuild/test/action/test_langpack_manifest.py
+++ b/python/mozbuild/mozbuild/test/action/test_langpack_manifest.py
@@ -1,14 +1,14 @@
 # -*- coding: utf-8 -*-
 
 # Any copyright is dedicated to the Public Domain.
 # http://creativecommons.org/publicdomain/zero/1.0/
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import unittest
 import json
 
 import mozunit
 
 import mozbuild.action.langpack_manifest as langpack_manifest
 from mozbuild.preprocessor import Context
--- a/python/mozbuild/mozbuild/test/action/test_package_fennec_apk.py
+++ b/python/mozbuild/mozbuild/test/action/test_package_fennec_apk.py
@@ -1,14 +1,14 @@
 # -*- coding: utf-8 -*-
 
 # Any copyright is dedicated to the Public Domain.
 # http://creativecommons.org/publicdomain/zero/1.0/
 
-from __future__ import absolute_import, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import os
 import unittest
 
 import mozunit
 
 from mozbuild.action.package_fennec_apk import (
     package_fennec_apk as package,
--- a/python/mozbuild/mozbuild/test/action/test_process_install_manifest.py
+++ b/python/mozbuild/mozbuild/test/action/test_process_install_manifest.py
@@ -1,14 +1,14 @@
 # -*- coding: utf-8 -*-
 
 # Any copyright is dedicated to the Public Domain.
 # http://creativecommons.org/publicdomain/zero/1.0/
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import os
 
 import mozunit
 
 from mozpack.manifests import (
     InstallManifest,
 )
--- a/python/mozbuild/mozbuild/test/analyze/test_graph.py
+++ b/python/mozbuild/mozbuild/test/analyze/test_graph.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import unittest
 import sqlite3 as lite
 import mozunit
 
 from mozbuild.analyze.graph import Graph
 
 CREATE_NODE = """CREATE TABLE node
--- a/python/mozbuild/mozbuild/test/backend/common.py
+++ b/python/mozbuild/mozbuild/test/backend/common.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import os
 import unittest
 
 from collections import defaultdict
 from shutil import rmtree
 from tempfile import mkdtemp
 
--- a/python/mozbuild/mozbuild/test/backend/test_configenvironment.py
+++ b/python/mozbuild/mozbuild/test/backend/test_configenvironment.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 import unittest
 from mozunit import main
 
 import mozbuild.backend.configenvironment as ConfigStatus
 
 from mozbuild.util import ReadOnlyDict
--- a/python/mozbuild/mozbuild/test/backend/test_fastermake.py
+++ b/python/mozbuild/mozbuild/test/backend/test_fastermake.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import os
 
 from mozpack.copier import FileRegistry
 from mozpack.manifests import InstallManifest
 from mozunit import main
 
 from mozbuild.backend.fastermake import FasterMakeBackend
--- a/python/mozbuild/mozbuild/test/backend/test_gn_processor.py
+++ b/python/mozbuild/mozbuild/test/backend/test_gn_processor.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import os
 import shutil
 import tempfile
 import unittest
 
 from copy import deepcopy
 
--- a/python/mozbuild/mozbuild/test/backend/test_partialconfigenvironment.py
+++ b/python/mozbuild/mozbuild/test/backend/test_partialconfigenvironment.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import buildconfig
 import os
 import unittest
 from mozunit import main
 from tempfile import mkdtemp
 from shutil import rmtree
 
--- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import cPickle as pickle
 import os
 import unittest
 
 from mozpack.manifests import (
     InstallManifest,
 )
--- a/python/mozbuild/mozbuild/test/backend/test_test_manifest.py
+++ b/python/mozbuild/mozbuild/test/backend/test_test_manifest.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import cPickle as pickle
 import os
 
 import mozpack.path as mozpath
 from mozunit import main
 
 from mozbuild.backend.test_manifest import TestManifestBackend
--- a/python/mozbuild/mozbuild/test/backend/test_visualstudio.py
+++ b/python/mozbuild/mozbuild/test/backend/test_visualstudio.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 from xml.dom.minidom import parse
 import os
 import unittest
 
 from mozbuild.backend.visualstudio import VisualStudioBackend
 from mozbuild.test.backend.common import BackendTester
 
--- a/python/mozbuild/mozbuild/test/codecoverage/test_lcov_rewrite.py
+++ b/python/mozbuild/mozbuild/test/codecoverage/test_lcov_rewrite.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 import unittest
 import shutil
 from StringIO import StringIO
 import json
 from tempfile import NamedTemporaryFile
 
--- a/python/mozbuild/mozbuild/test/common.py
+++ b/python/mozbuild/mozbuild/test/common.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import errno
 import os
 import shutil
 
 from buildconfig import topsrcdir
 
 from mach.logging import LoggingManager
--- a/python/mozbuild/mozbuild/test/compilation/test_warnings.py
+++ b/python/mozbuild/mozbuild/test/compilation/test_warnings.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 import unittest
 
 from mozfile.mozfile import NamedTemporaryFile
 
 from mozbuild.compilation.warnings import CompilerWarning
 from mozbuild.compilation.warnings import WarningsCollector
--- a/python/mozbuild/mozbuild/test/controller/test_ccachestats.py
+++ b/python/mozbuild/mozbuild/test/controller/test_ccachestats.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import time
 import unittest
 
 from mozunit import main
 
 from mozbuild.controller.building import CCacheStats
 
--- a/python/mozbuild/mozbuild/test/controller/test_clobber.py
+++ b/python/mozbuild/mozbuild/test/controller/test_clobber.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import os
 import shutil
 import tempfile
 import unittest
 
 from mozunit import main
 
--- a/python/mozbuild/mozbuild/test/frontend/test_context.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_context.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 import unittest
 
 from mozunit import main
 
 from mozbuild.frontend.context import (
     AbsolutePath,
--- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import os
 import unittest
 
 from mozunit import main
 
 from mozbuild.frontend.context import (
     ObjDirPath,
--- a/python/mozbuild/mozbuild/test/frontend/test_namespaces.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_namespaces.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import unittest
 
 from mozunit import main
 
 from mozbuild.frontend.context import (
     Context,
     ContextDerivedValue,
--- a/python/mozbuild/mozbuild/test/frontend/test_reader.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_reader.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import os
 import sys
 import unittest
 
 from mozunit import main
 
 from mozbuild import schedules
--- a/python/mozbuild/mozbuild/test/frontend/test_sandbox.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_sandbox.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import unittest
 
 from mozunit import main
 
 from mozbuild.frontend.reader import (
     MozbuildSandbox,
     SandboxCalledError,
--- a/python/mozbuild/mozbuild/test/test_android_version_code.py
+++ b/python/mozbuild/mozbuild/test/test_android_version_code.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 from mozunit import main
 import unittest
 
 from mozbuild.android_version_code import (
     android_version_code_v0,
     android_version_code_v1,
 )
--- a/python/mozbuild/mozbuild/test/test_artifact_cache.py
+++ b/python/mozbuild/mozbuild/test/test_artifact_cache.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import os
 import mozunit
 import time
 import unittest
 from tempfile import mkdtemp
 from shutil import rmtree
 
--- a/python/mozbuild/mozbuild/test/test_base.py
+++ b/python/mozbuild/mozbuild/test/test_base.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import json
 import os
 import shutil
 import subprocess
 import sys
 import tempfile
 import unittest
--- a/python/mozbuild/mozbuild/test/test_containers.py
+++ b/python/mozbuild/mozbuild/test/test_containers.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import unittest
 
 from mozunit import main
 
 from mozbuild.util import (
     KeyedDefaultDict,
     List,
--- a/python/mozbuild/mozbuild/test/test_dotproperties.py
+++ b/python/mozbuild/mozbuild/test/test_dotproperties.py
@@ -1,11 +1,11 @@
 # -*- coding: utf-8 -*-
 
-from __future__ import absolute_import, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import os
 import unittest
 
 from StringIO import StringIO
 
 import mozpack.path as mozpath
 
--- a/python/mozbuild/mozbuild/test/test_expression.py
+++ b/python/mozbuild/mozbuild/test/test_expression.py
@@ -1,9 +1,9 @@
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import unittest
 
 import mozunit
 
 from mozbuild.preprocessor import Expression, Context
 
 
--- a/python/mozbuild/mozbuild/test/test_licenses.py
+++ b/python/mozbuild/mozbuild/test/test_licenses.py
@@ -1,9 +1,9 @@
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import unittest
 
 import mozunit
 
 from mozbuild.vendor_rust import VendorRust
 
 
--- a/python/mozbuild/mozbuild/test/test_line_endings.py
+++ b/python/mozbuild/mozbuild/test/test_line_endings.py
@@ -1,9 +1,9 @@
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import unittest
 
 from StringIO import StringIO
 import os
 import os.path
 import mozunit
 
--- a/python/mozbuild/mozbuild/test/test_makeutil.py
+++ b/python/mozbuild/mozbuild/test/test_makeutil.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 from mozbuild.makeutil import (
     Makefile,
     read_dep_makefile,
     Rule,
     write_dep_makefile,
 )
 from mozunit import main
--- a/python/mozbuild/mozbuild/test/test_manifest.py
+++ b/python/mozbuild/mozbuild/test/test_manifest.py
@@ -1,14 +1,14 @@
 # coding: utf-8
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import unittest
 
 import mozfile
 from mozbuild.moz_yaml import load_moz_yaml, VerifyError
 from nose.tools import raises
 
 
--- a/python/mozbuild/mozbuild/test/test_mozconfig.py
+++ b/python/mozbuild/mozbuild/test/test_mozconfig.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import os
 import unittest
 
 from shutil import rmtree
 
 from tempfile import (
     gettempdir,
--- a/python/mozbuild/mozbuild/test/test_mozinfo.py
+++ b/python/mozbuild/mozbuild/test/test_mozinfo.py
@@ -1,14 +1,14 @@
 #!/usr/bin/env python
 # 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
+from __future__ import absolute_import, print_function
 
 import json
 import os
 import tempfile
 import unittest
 
 from StringIO import StringIO
 
--- a/python/mozbuild/mozbuild/test/test_preprocessor.py
+++ b/python/mozbuild/mozbuild/test/test_preprocessor.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import unittest
 
 from StringIO import StringIO
 import os
 import shutil
 
 from tempfile import mkdtemp
--- a/python/mozbuild/mozbuild/test/test_pythonutil.py
+++ b/python/mozbuild/mozbuild/test/test_pythonutil.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 from mozbuild.pythonutil import iter_modules_in_path
 from mozunit import main
 import os
 
 
 def test_iter_modules_in_path():
     tests_path = os.path.normcase(os.path.dirname(__file__))
--- a/python/mozbuild/mozbuild/test/test_util.py
+++ b/python/mozbuild/mozbuild/test/test_util.py
@@ -1,14 +1,14 @@
 # coding: utf-8
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import itertools
 import hashlib
 import os
 import unittest
 import shutil
 import string
 import sys
--- a/python/mozbuild/mozbuild/testing.py
+++ b/python/mozbuild/mozbuild/testing.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import cPickle as pickle
 import os
 import sys
 
 import mozpack.path as mozpath
 
 from mozpack.copier import FileCopier
--- a/python/mozbuild/mozpack/archive.py
+++ b/python/mozbuild/mozpack/archive.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import bz2
 import gzip
 import stat
 import tarfile
 
 from .files import (
     BaseFile, File,
--- a/python/mozbuild/mozpack/chrome/flags.py
+++ b/python/mozbuild/mozpack/chrome/flags.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import re
 from distutils.version import LooseVersion
 from mozpack.errors import errors
 from collections import OrderedDict
 
 
 class Flag(object):
--- a/python/mozbuild/mozpack/chrome/manifest.py
+++ b/python/mozbuild/mozpack/chrome/manifest.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import re
 import os
 
 try:
     from urlparse import urlparse
 except ImportError:
     from urllib.parse import urlparse
--- a/python/mozbuild/mozpack/copier.py
+++ b/python/mozbuild/mozpack/copier.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 import stat
 import sys
 
 from mozpack.errors import errors
 from mozpack.files import (
     BaseFile,
--- a/python/mozbuild/mozpack/dmg.py
+++ b/python/mozbuild/mozpack/dmg.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import buildconfig
 import errno
 import mozfile
 import os
 import platform
 import shutil
 import subprocess
--- a/python/mozbuild/mozpack/errors.py
+++ b/python/mozbuild/mozpack/errors.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import sys
 from contextlib import contextmanager
 
 
 class ErrorMessage(Exception):
     '''Exception type raised from errors.error() and errors.fatal()'''
 
@@ -92,17 +92,17 @@ class ErrorCollector(object):
         return "%s: %s" % (level, msg)
 
     def _handle(self, level, msg):
         msg = self._full_message(level, msg)
         if level >= self._level:
             if self._count is None:
                 raise ErrorMessage(msg)
             self._count += 1
-        print >>self.out, msg
+        print(msg, file=self.out)
 
     def fatal(self, msg):
         self._handle(self.FATAL, msg)
 
     def error(self, msg):
         self._handle(self.ERROR, msg)
 
     def warn(self, msg):
--- a/python/mozbuild/mozpack/executables.py
+++ b/python/mozbuild/mozpack/executables.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import os
 import struct
 import subprocess
 from mozpack.errors import errors
 
 MACHO_SIGNATURES = [
     0xfeedface,  # mach-o 32-bits big endian
--- a/python/mozbuild/mozpack/files.py
+++ b/python/mozbuild/mozpack/files.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import errno
 import inspect
 import os
 import platform
 import shutil
 import stat
 import subprocess
--- a/python/mozbuild/mozpack/hg.py
+++ b/python/mozbuild/mozpack/hg.py
@@ -22,17 +22,17 @@
 # modification of the file, and distribution when not combined with
 # mozbuild.)
 #
 # If you modify this code, you may extend this exception to your
 # version of the code, but you are not obliged to do so. If you
 # do not wish to do so, delete this exception statement from your
 # version.
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import mercurial.error as error
 import mercurial.hg as hg
 import mercurial.ui as hgui
 
 from .files import (
     BaseFinder,
     MercurialFile,
--- a/python/mozbuild/mozpack/manifests.py
+++ b/python/mozbuild/mozpack/manifests.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 from contextlib import contextmanager
 import json
 
 from .files import (
     AbsoluteSymlinkFile,
     ExistingFile,
     File,
--- a/python/mozbuild/mozpack/mozjar.py
+++ b/python/mozbuild/mozpack/mozjar.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 from io import BytesIO
 import struct
 import subprocess
 import zlib
 import os
 from zipfile import (
     ZIP_STORED,
--- a/python/mozbuild/mozpack/packager/__init__.py
+++ b/python/mozbuild/mozpack/packager/__init__.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 from mozbuild.preprocessor import Preprocessor
 import re
 import os
 from mozpack.errors import errors
 from mozpack.chrome.manifest import (
     Manifest,
     ManifestBinaryComponent,
--- a/python/mozbuild/mozpack/packager/formats.py
+++ b/python/mozbuild/mozpack/packager/formats.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 from mozpack.chrome.manifest import (
     Manifest,
     ManifestInterfaces,
     ManifestChrome,
     ManifestBinaryComponent,
     ManifestResource,
     ManifestMultiContent,
--- a/python/mozbuild/mozpack/packager/l10n.py
+++ b/python/mozbuild/mozpack/packager/l10n.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 '''
 Replace localized parts of a packaged directory with data from a langpack
 directory.
 '''
 
 import json
 import os
--- a/python/mozbuild/mozpack/packager/unpack.py
+++ b/python/mozbuild/mozpack/packager/unpack.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import mozpack.path as mozpath
 from mozpack.files import (
     BaseFinder,
     FileFinder,
     DeflatedFile,
     ManifestFile,
 )
--- a/python/mozbuild/mozpack/path.py
+++ b/python/mozbuild/mozpack/path.py
@@ -3,17 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 '''
 Like :py:mod:`os.path`, with a reduced set of functions, and with normalized path
 separators (always use forward slashes).
 Also contains a few additional utilities not found in :py:mod:`os.path`.
 '''
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import ctypes
 import posixpath
 import os
 import re
 import sys
 
 
--- a/python/mozbuild/mozpack/test/test_archive.py
+++ b/python/mozbuild/mozpack/test/test_archive.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import hashlib
 import os
 import shutil
 import stat
 import tarfile
 import tempfile
 import unittest
--- a/python/mozbuild/mozpack/test/test_chrome_flags.py
+++ b/python/mozbuild/mozpack/test/test_chrome_flags.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import unittest
 import mozunit
 from mozpack.chrome.flags import (
     Flag,
     StringFlag,
     VersionFlag,
     Flags,
--- a/python/mozbuild/mozpack/test/test_chrome_manifest.py
+++ b/python/mozbuild/mozpack/test/test_chrome_manifest.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import unittest
 import mozunit
 import os
 from mozpack.chrome.manifest import (
     ManifestContent,
     ManifestLocale,
     ManifestSkin,
--- a/python/mozbuild/mozpack/test/test_copier.py
+++ b/python/mozbuild/mozpack/test/test_copier.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 from mozpack.copier import (
     FileCopier,
     FileRegistry,
     FileRegistrySubtree,
     Jarrer,
 )
 from mozpack.files import (
--- a/python/mozbuild/mozpack/test/test_errors.py
+++ b/python/mozbuild/mozpack/test/test_errors.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 from mozpack.errors import (
     errors,
     ErrorMessage,
     AccumulatedErrors,
 )
 import unittest
 import mozunit
--- a/python/mozbuild/mozpack/test/test_files.py
+++ b/python/mozbuild/mozpack/test/test_files.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 from mozbuild.util import ensureParentDir
 
 from mozpack.errors import (
     ErrorMessage,
     errors,
 )
 from mozpack.files import (
--- a/python/mozbuild/mozpack/test/test_manifests.py
+++ b/python/mozbuild/mozpack/test/test_manifests.py
@@ -1,13 +1,13 @@
 # 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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 import os
 
 import mozunit
 
 from mozpack.copier import (
     FileCopier,
     FileRegistry,
--- a/python/mozbuild/mozpack/test/test_mozjar.py
+++ b/python/mozbuild/mozpack/test/test_mozjar.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 from mozpack.files import FileFinder
 from mozpack.mozjar import (
     JarReaderError,
     JarWriterError,
     JarStruct,
     JarReader,
     JarWriter,
--- a/python/mozbuild/mozpack/test/test_packager.py
+++ b/python/mozbuild/mozpack/test/test_packager.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import unittest
 import mozunit
 import os
 from buildconfig import topobjdir
 from mozpack.packager import (
     preprocess_manifest,
     CallDeque,
--- a/python/mozbuild/mozpack/test/test_packager_formats.py
+++ b/python/mozbuild/mozpack/test/test_packager_formats.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import mozunit
 import unittest
 from mozpack.packager.formats import (
     FlatFormatter,
     JarFormatter,
     OmniJarFormatter,
 )
--- a/python/mozbuild/mozpack/test/test_packager_l10n.py
+++ b/python/mozbuild/mozpack/test/test_packager_l10n.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import unittest
 import mozunit
 from test_packager import MockFinder
 from mozpack.packager import l10n
 from mozpack.files import (
     GeneratedFile,
     ManifestFile,
--- a/python/mozbuild/mozpack/test/test_packager_unpack.py
+++ b/python/mozbuild/mozpack/test/test_packager_unpack.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 import mozunit
 from mozpack.packager.formats import (
     FlatFormatter,
     JarFormatter,
     OmniJarFormatter,
 )
 from mozpack.packager.unpack import unpack_to_registry
--- a/python/mozbuild/mozpack/test/test_path.py
+++ b/python/mozbuild/mozpack/test/test_path.py
@@ -1,13 +1,13 @@
 # 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
+from __future__ import absolute_import, print_function
 
 from mozpack.path import (
     relpath,
     join,
     normpath,
     dirname,
     commonprefix,
     basename,