Browse Source

Chronological shuffle for 71a1

Ian Neal 1 month ago
parent
commit
69544dfe34

+ 7 - 8
mozilla-release/patches/1554657-71a1.patch

@@ -2,7 +2,7 @@
 # User Anmol Agarwal <anmol.agarwal001@gmail.com>
 # Date 1569244765 0
 # Node ID 51e40b81f6828da34c2f6f01d9874d41a1911338
-# Parent  14c8c8806a4db32cc80a66280f07829166abaeee
+# Parent  5df7f949d82065bc2fdd6c421047accf195a6ad1
 Bug 1554657 - Add a verbose mode to |mach lint| to display log output r=ahal
 
 Differential Revision: https://phabricator.services.mozilla.com/D43507
@@ -463,13 +463,13 @@ diff --git a/tools/lint/spell/__init__.py b/tools/lint/spell/__init__.py
          return []
  
      config['root'] = lintargs['root']
- 
-@@ -126,13 +126,14 @@ def lint(paths, config, fix=None, **lint
-                 # 4: shut down warnings about automatic fixes
-                 #    that were disabled in dictionary.
+     exclude_list = os.path.join(here, 'exclude-list.txt')
+@@ -124,13 +124,14 @@ def lint(paths, config, fix=None, **lint
                  '--quiet-level=7',
                  '--ignore-words=' + exclude_list,
-                 skip_files]
+                 # Ignore dictonnaries
+                 '--skip=*.dic',
+                 ]
  
      if fix:
          cmd_args.append('--write-changes')
@@ -534,7 +534,7 @@ diff --git a/tools/lint/test/conftest.py b/tools/lint/test/conftest.py
 diff --git a/tools/lint/yamllint_/__init__.py b/tools/lint/yamllint_/__init__.py
 --- a/tools/lint/yamllint_/__init__.py
 +++ b/tools/lint/yamllint_/__init__.py
-@@ -116,27 +116,29 @@ def gen_yamllint_args(cmdargs, paths=Non
+@@ -116,26 +116,28 @@ def gen_yamllint_args(cmdargs, paths=Non
      if isinstance(paths, string_types):
          paths = [paths]
      if conf_file and conf_file != 'default':
@@ -551,7 +551,6 @@ diff --git a/tools/lint/yamllint_/__init__.py b/tools/lint/yamllint_/__init__.py
      binary = get_yamllint_binary()
  
      cmdargs = [
-         which('python'),
          binary,
          '-f', 'parsable'
      ]

+ 0 - 0
mozilla-release/patches/1567642-2-71a1.patch → mozilla-release/patches/1567642-6-71a1.patch


+ 0 - 24
mozilla-release/patches/1577726-1-71a1.patch

@@ -1,24 +0,0 @@
-# HG changeset patch
-# User Sylvestre Ledru <sledru@mozilla.com>
-# Date 1567691542 0
-# Node ID 95fc1c757f6af384097d1cd14388dd69808f205f
-# Parent  6895de7cc511a4afad1f11a1baf153156d899f96
-Bug 1577726 - Ride along: Remove third_party from the clang tidy configuration as it isn't used r=andi
-
-Differential Revision: https://phabricator.services.mozilla.com/D44163
-
-diff --git a/tools/clang-tidy/config.yaml b/tools/clang-tidy/config.yaml
---- a/tools/clang-tidy/config.yaml
-+++ b/tools/clang-tidy/config.yaml
-@@ -163,11 +163,8 @@ clang_checkers:
-   - name: google-readability-todo
-     publish: !!bool no
-   - name: google-runtime-int
-     publish: !!bool no
-   - name: google-runtime-operator
-     publish: !!bool no
-   - name: google-runtime-references
-     publish: !!bool no
--
--# Third party files from mozilla-central
--third_party: tools/rewriting/ThirdPartyPaths.txt

+ 0 - 225
mozilla-release/patches/1577726-2-71a1.patch

@@ -1,225 +0,0 @@
-# HG changeset patch
-# User Sylvestre Ledru <sledru@mozilla.com>
-# Date 1567693461 0
-# Node ID df7da1b22c2f259242adb42b4ea271b8d7a5a828
-# Parent  4f0f0f30455ec2ec28b6fa7ca6ac56d3c80711c0
-Bug 1577726 - Move generated directories into a dedicated file (Generated.txt) from ThirdPartyPaths.txt r=ahal
-
-Differential Revision: https://phabricator.services.mozilla.com/D44147
-
-diff --git a/build/clang-plugin/ThirdPartyPaths.py b/build/clang-plugin/ThirdPartyPaths.py
---- a/build/clang-plugin/ThirdPartyPaths.py
-+++ b/build/clang-plugin/ThirdPartyPaths.py
-@@ -1,27 +1,31 @@
- #!/usr/bin/env python
- 
- import json
- 
- 
--def generate(output, tpp_txt):
-+def generate(output, *input_paths):
-     """
-     This file generates a ThirdPartyPaths.cpp file from the ThirdPartyPaths.txt
-     file in /tools/rewriting, which is used by the Clang Plugin to help identify
-     sources which should be ignored.
-     """
-+    tpp_list = []
-+    lines = set()
- 
--    tpp_list = []
--    with open(tpp_txt) as f:
--        for line in f.readlines():
--            line = line.strip()
--            if line.endswith('/'):
--                line = line[:-1]
--            tpp_list.append(line)
-+    for path in input_paths:
-+        with open(path) as f:
-+            lines.update(f.readlines())
-+
-+    for line in lines:
-+        line = line.strip()
-+        if line.endswith('/'):
-+            line = line[:-1]
-+        tpp_list.append(line)
-     tpp_strings = ',\n  '.join([json.dumps(tpp) for tpp in tpp_list])
- 
-     output.write("""\
- /* THIS FILE IS GENERATED BY ThirdPartyPaths.py - DO NOT EDIT */
- 
- #include <stdint.h>
- 
- const char* MOZ_THIRD_PARTY_PATHS[] = {
-diff --git a/build/clang-plugin/import_mozilla_checks.py b/build/clang-plugin/import_mozilla_checks.py
---- a/build/clang-plugin/import_mozilla_checks.py
-+++ b/build/clang-plugin/import_mozilla_checks.py
-@@ -91,18 +91,20 @@ def add_item_to_cmake_section(cmake_path
-             f.write(line)
- 
-     f.close()
- 
- 
- def write_third_party_paths(mozilla_path, module_path):
-     tpp_txt = os.path.join(
-         mozilla_path, '../../tools/rewriting/ThirdPartyPaths.txt')
-+    generated_txt = os.path.join(
-+        mozilla_path, '../../tools/rewriting/Generated.txt')
-     with open(os.path.join(module_path, 'ThirdPartyPaths.cpp'), 'w') as f:
--        ThirdPartyPaths.generate(f, tpp_txt)
-+        ThirdPartyPaths.generate(f, tpp_txt, generated_txt)
- 
- 
- def do_import(mozilla_path, clang_tidy_path):
-     module = 'mozilla'
-     module_path = os.path.join(clang_tidy_path, module)
-     if not os.path.isdir(module_path):
-         os.mkdir(module_path)
- 
-diff --git a/build/clang-plugin/moz.build b/build/clang-plugin/moz.build
---- a/build/clang-plugin/moz.build
-+++ b/build/clang-plugin/moz.build
-@@ -48,16 +48,17 @@ if CONFIG['ENABLE_MOZSEARCH_PLUGIN']:
-         'mozsearch-plugin/JSONFormatter.cpp',
-         'mozsearch-plugin/MozsearchIndexer.cpp',
-         'mozsearch-plugin/StringOperations.cpp',
-     ]
- 
- GeneratedFile('ThirdPartyPaths.cpp', script="ThirdPartyPaths.py",
-               entry_point="generate", inputs=[
-                   '/tools/rewriting/ThirdPartyPaths.txt',
-+                  '/tools/rewriting/Generated.txt',
-               ])
- 
- HOST_COMPILE_FLAGS['STL'] = []
- HOST_COMPILE_FLAGS['VISIBILITY'] = []
- 
- # libc++ is required to build plugins against clang on OS X.
- if CONFIG['HOST_OS_ARCH'] == 'Darwin':
-     HOST_CXXFLAGS += ['-stdlib=libc++']
-diff --git a/python/mozbuild/mozbuild/controller/building.py b/python/mozbuild/mozbuild/controller/building.py
---- a/python/mozbuild/mozbuild/controller/building.py
-+++ b/python/mozbuild/mozbuild/controller/building.py
-@@ -1344,20 +1344,26 @@ class BuildDriver(MozbuildObject):
-             # until we suppress them for real.
-             # TODO remove entries/feature once we stop generating warnings
-             # in these directories.
-             pathToThirdparty = os.path.join(self.topsrcdir,
-                                             "tools",
-                                             "rewriting",
-                                             "ThirdPartyPaths.txt")
- 
-+            pathToGenerated = os.path.join(self.topsrcdir,
-+                                           "tools",
-+                                           "rewriting",
-+                                           "Generated.txt")
-+
-             if os.path.exists(pathToThirdparty):
--                with open(pathToThirdparty) as f:
-+                with open(pathToThirdparty) as f, open(pathToGenerated) as g:
-                     # Normalize the path (no trailing /)
--                    LOCAL_SUPPRESS_DIRS = tuple(d.rstrip('/') for d in f.read().splitlines())
-+                    suppress = f.readlines() + g.readlines()
-+                    LOCAL_SUPPRESS_DIRS = tuple(s.strip('/') for s in suppress)
-             else:
-                 # For application based on gecko like thunderbird
-                 LOCAL_SUPPRESS_DIRS = ()
- 
-             suppressed_by_dir = Counter()
- 
-             for warning in sorted(monitor.instance_warnings):
-                 path = mozpath.normsep(warning['filename'])
-diff --git a/tools/infer/config.yaml b/tools/infer/config.yaml
---- a/tools/infer/config.yaml
-+++ b/tools/infer/config.yaml
-@@ -16,8 +16,9 @@ infer_checkers:
-   - name: litho
-     publish: !!bool yes
-   - name: racerd
-     publish: !!bool yes
-   - name: liveness
-     publish: !!bool yes
- # Third party files from mozilla-central
- third_party: tools/rewriting/ThirdPartyPaths.txt
-+generated: tools/rewriting/Generated.txt
-\ No newline at end of file
-diff --git a/tools/lint/mach_commands.py b/tools/lint/mach_commands.py
---- a/tools/lint/mach_commands.py
-+++ b/tools/lint/mach_commands.py
-@@ -15,17 +15,20 @@ from mozbuild.base import (
- from mach.decorators import (
-     CommandArgument,
-     CommandProvider,
-     Command,
- )
- 
- 
- here = os.path.abspath(os.path.dirname(__file__))
--THIRD_PARTY_PATHS = os.path.join('tools', 'rewriting', 'ThirdPartyPaths.txt')
-+EXCLUSION_FILES = [
-+    os.path.join('tools', 'rewriting', 'Generated.txt'),
-+    os.path.join('tools', 'rewriting', 'ThirdPartyPaths.txt'),
-+]
- GLOBAL_EXCLUDES = [
-     'node_modules',
-     'tools/lint/test/files',
- ]
- 
- 
- def setup_argument_parser():
-     from mozlint import cli
-@@ -35,19 +38,20 @@ def setup_argument_parser():
- def get_global_excludes(topsrcdir):
-     # exclude misc paths
-     excludes = GLOBAL_EXCLUDES[:]
- 
-     # exclude top level paths that look like objdirs
-     excludes.extend([name for name in os.listdir(topsrcdir)
-                      if name.startswith('obj') and os.path.isdir(name)])
- 
--    # exclude third party paths
--    with open(os.path.join(topsrcdir, THIRD_PARTY_PATHS), 'r') as fh:
--        excludes.extend([f.strip() for f in fh.readlines()])
-+    for path in EXCLUSION_FILES:
-+        # exclude third party paths
-+        with open(os.path.join(topsrcdir, path), 'r') as fh:
-+            excludes.extend([f.strip() for f in fh.readlines()])
- 
-     return excludes
- 
- 
- @CommandProvider
- class MachCommands(MachCommandBase):
- 
-     @Command(
-@@ -66,17 +70,18 @@ class MachCommands(MachCommandBase):
-             buildargs['topobjdir'] = self.topobjdir
-             lintargs.update(buildargs)
-         except BuildEnvironmentNotFoundException:
-             pass
- 
-         lintargs.setdefault('root', self.topsrcdir)
-         lintargs['exclude'] = get_global_excludes(lintargs['root'])
-         cli.SEARCH_PATHS.append(here)
--        parser.GLOBAL_SUPPORT_FILES.append(os.path.join(self.topsrcdir, THIRD_PARTY_PATHS))
-+        for path in EXCLUSION_FILES:
-+            parser.GLOBAL_SUPPORT_FILES.append(os.path.join(self.topsrcdir, path))
-         return cli.run(*runargs, **lintargs)
- 
-     @Command('eslint', category='devenv',
-              description='Run eslint or help configure eslint for optimal development.')
-     @CommandArgument('paths', default=None, nargs='*',
-                      help="Paths to file or directories to lint, like "
-                           "'browser/' Defaults to the "
-                           "current directory if not given.")
-diff --git a/tools/rewriting/Generated.txt b/tools/rewriting/Generated.txt
-new file mode 100644
---- /dev/null
-+++ b/tools/rewriting/Generated.txt
-@@ -0,0 +1,7 @@
-+browser/components/newtab/node_modules/
-+devtools/client/aboutdebugging/test/jest/node_modules/
-+devtools/client/application/test/components/node_modules/
-+devtools/client/debugger/node_modules/
-+dom/tests/ajax/jquery/
-+dom/tests/ajax/mochikit/
-+node_modules/

+ 0 - 78
mozilla-release/patches/1577726-2-fix-71a1.patch

@@ -1,78 +0,0 @@
-# HG changeset patch
-# User Sylvestre Ledru <sledru@mozilla.com>
-# Date 1567693461 0
-# Node ID df7da1b22c2f259242adb42b4ea271b8d7a5a828
-# Parent  d935413c47f961490807244543ce9854a431faa2
-Bug 1577726 - Move generated directories into a dedicated file (Generated.txt) from ThirdPartyPaths.txt r=ahal
-
-Differential Revision: https://phabricator.services.mozilla.com/D44147
-
-diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
---- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
-+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
-@@ -687,20 +687,21 @@ class StaticAnalysis(MachCommandBase):
-             if rc != 0:
-                 return rc
-         rc = self._get_infer(verbose=verbose)
-         if rc != 0:
-             self.log(logging.WARNING, 'static-analysis', {},
-                      'This command is only available for linux64!')
-             return rc
-         # which checkers to use, and which folders to exclude
--        all_checkers, third_party_path = self._get_infer_config()
-+        all_checkers, third_party_path, generated_path = self._get_infer_config()
-         checkers, excludes = self._get_infer_args(
-             checks=checks or all_checkers,
--            third_party_path=third_party_path
-+            third_party_path=third_party_path,
-+            generated_path=generated_path
-         )
-         rc = rc or self._gradle(['clean'])  # clean so that we can recompile
-         # infer capture command
-         capture_cmd = [self._infer_path, 'capture'] + excludes + ['--']
-         rc = rc or self._gradle([task], infer_args=capture_cmd, verbose=verbose)
-         tmp_file, args = self._get_infer_source_args(java_sources)
-         # infer analyze command
-         analysis_cmd = [self._infer_path, 'analyze', '--keep-going'] +  \
-@@ -751,33 +752,35 @@ class StaticAnalysis(MachCommandBase):
-         with open(mozpath.join(self.topsrcdir, 'tools',
-                                'infer', 'config.yaml')) as f:
-             try:
-                 config = yaml.safe_load(f)
-                 for item in config['infer_checkers']:
-                     if item['publish']:
-                         checkers.append(item['name'])
-                 tp_path = mozpath.join(self.topsrcdir, config['third_party'])
-+                generated_path = mozpath.join(self.topsrcdir, config['generated'])
-             except Exception:
-                 print('Looks like config.yaml is not valid, so we are unable '
-                       'to determine default checkers, and which folder to '
-                       'exclude, using defaults provided by infer')
--        return checkers, tp_path
-+        return checkers, tp_path, generated_path
- 
--    def _get_infer_args(self, checks, third_party_path):
-+    def _get_infer_args(self, checks, *input_paths):
-         '''Return the arguments which include the checkers <checks>, and
-         excludes all folder in <third_party_path>.'''
-         checkers = ['-a', 'checkers']
-         excludes = []
-         for checker in checks:
-             checkers.append('--' + checker)
--        with open(third_party_path) as f:
--            for line in f:
--                excludes.append('--skip-analysis-in-path')
--                excludes.append(line.strip('\n'))
-+        for path in input_paths:
-+            with open(path) as f:
-+                for line in f:
-+                    excludes.append('--skip-analysis-in-path')
-+                    excludes.append(line.strip('\n'))
-         return checkers, excludes
- 
-     def _get_clang_tidy_config(self):
-         try:
-             file_handler = open(mozpath.join(self.topsrcdir, "tools", "clang-tidy", "config.yaml"))
-             config = yaml.safe_load(file_handler)
-         except Exception:
-             self.log(logging.ERROR, 'static-analysis', {},

+ 20 - 17
mozilla-release/patches/1577726-3-71a1.patch

@@ -1,21 +1,24 @@
 # HG changeset patch
 # User Sylvestre Ledru <sledru@mozilla.com>
-# Date 1568018098 0
-# Node ID 4c1c88bcac8b4124e6e03595a02dc4bf1e6b3f5e
-# Parent  6fcbe662e4787b65ad9c42e9505073ccc6514a06
-Bug 1577726 - Move a path from tools/rewriting/ThirdPartyPaths.txt to tools/rewriting/Generated.txt r=andi
+# Date 1567691542 0
+# Node ID 95fc1c757f6af384097d1cd14388dd69808f205f
+# Parent  6895de7cc511a4afad1f11a1baf153156d899f96
+Bug 1577726 - Ride along: Remove third_party from the clang tidy configuration as it isn't used r=andi
 
-Differential Revision: https://phabricator.services.mozilla.com/D45158
+Differential Revision: https://phabricator.services.mozilla.com/D44163
 
-diff --git a/tools/rewriting/Generated.txt b/tools/rewriting/Generated.txt
---- a/tools/rewriting/Generated.txt
-+++ b/tools/rewriting/Generated.txt
-@@ -1,7 +1,8 @@
-+browser/components/newtab/logs/
- browser/components/newtab/node_modules/
- devtools/client/aboutdebugging/test/jest/node_modules/
- devtools/client/application/test/components/node_modules/
- devtools/client/debugger/node_modules/
- dom/tests/ajax/jquery/
- dom/tests/ajax/mochikit/
- node_modules/
+diff --git a/tools/clang-tidy/config.yaml b/tools/clang-tidy/config.yaml
+--- a/tools/clang-tidy/config.yaml
++++ b/tools/clang-tidy/config.yaml
+@@ -163,11 +163,8 @@ clang_checkers:
+   - name: google-readability-todo
+     publish: !!bool no
+   - name: google-runtime-int
+     publish: !!bool no
+   - name: google-runtime-operator
+     publish: !!bool no
+   - name: google-runtime-references
+     publish: !!bool no
+-
+-# Third party files from mozilla-central
+-third_party: tools/rewriting/ThirdPartyPaths.txt

+ 290 - 63
mozilla-release/patches/1577726-4-71a1.patch

@@ -1,67 +1,294 @@
 # HG changeset patch
 # User Sylvestre Ledru <sledru@mozilla.com>
-# Date 1568018023 0
-# Node ID 29a4f1f27dde683b3e149ef98b6317e600c694f7
-# Parent  8c7db053e78bfeae5981373b99b101a0b82ffa23
-Bug 1577726 - Reorder tools/rewriting/ThirdPartyPaths.txt r=andi
+# Date 1567693461 0
+# Node ID df7da1b22c2f259242adb42b4ea271b8d7a5a828
+# Parent  12088c31415a9e6d05c148d881c0f02621bbfe01
+Bug 1577726 - Move generated directories into a dedicated file (Generated.txt) from ThirdPartyPaths.txt r=ahal
 
-Depends on D45158
+Differential Revision: https://phabricator.services.mozilla.com/D44147
 
-Differential Revision: https://phabricator.services.mozilla.com/D45160
-
-diff --git a/tools/lint/docs/index.rst b/tools/lint/docs/index.rst
---- a/tools/lint/docs/index.rst
-+++ b/tools/lint/docs/index.rst
-@@ -13,17 +13,17 @@ 1. It provides a standard method for add
-    defining a config object in a ``.yml`` file. This helps keep lint related code localized, and
-    prevents different teams from coming up with their own unique lint implementations.
- 2. It provides a streamlined interface for running all linters at once. Instead of running N
-    different lint commands to test your patch, a single ``mach lint`` command will automatically run
-    all applicable linters. This means there is a single API surface that other tools can use to
-    invoke linters.
- 
- ``Mozlint`` isn't designed to be used directly by end users. Instead, it can be consumed by things
--like mach, mozreview and taskcluster.
-+like mach, phabricator and taskcluster.
- 
- .. toctree::
-   :caption: Linting User Guide
-   :maxdepth: 2
- 
-   usage
-   create
-   linters/eslint
-diff --git a/tools/rewriting/ThirdPartyPaths.txt b/tools/rewriting/ThirdPartyPaths.txt
---- a/tools/rewriting/ThirdPartyPaths.txt
-+++ b/tools/rewriting/ThirdPartyPaths.txt
-@@ -1,10 +1,12 @@
- browser/components/translation/cld2/
-+build/pymake
- devtools/client/debugger/flow-typed/
-+devtools/shared/jsbeautify/
- extensions/spellcheck/hunspell/src/
- gfx/angle/
- gfx/cairo/
- gfx/graphite2/
- gfx/harfbuzz/
- gfx/ots/
- gfx/qcms/
- gfx/sfntly/
-@@ -15,16 +17,17 @@ gfx/webrender_api
- gfx/wrench/
- gfx/ycbcr/
- intl/hyphenation/hyphen/
- intl/icu/
- ipc/chromium/
- js/src/ctypes/libffi/
- js/src/dtoa.c
- js/src/jit/arm64/vixl/
-+js/src/vtune/ittnotify_config.h
- media/ffvpx/
- media/gmp-clearkey/0.1/openaes/
- media/kiss_fft/
- media/libav/
- media/libcubeb/
- media/libjpeg/
- media/libmkv/
- media/libnestegg/
+diff --git a/build/clang-plugin/ThirdPartyPaths.py b/build/clang-plugin/ThirdPartyPaths.py
+--- a/build/clang-plugin/ThirdPartyPaths.py
++++ b/build/clang-plugin/ThirdPartyPaths.py
+@@ -1,27 +1,31 @@
+ #!/usr/bin/env python
+ 
+ import json
+ 
+ 
+-def generate(output, tpp_txt):
++def generate(output, *input_paths):
+     """
+     This file generates a ThirdPartyPaths.cpp file from the ThirdPartyPaths.txt
+     file in /tools/rewriting, which is used by the Clang Plugin to help identify
+     sources which should be ignored.
+     """
++    tpp_list = []
++    lines = set()
+ 
+-    tpp_list = []
+-    with open(tpp_txt) as f:
+-        for line in f.readlines():
+-            line = line.strip()
+-            if line.endswith('/'):
+-                line = line[:-1]
+-            tpp_list.append(line)
++    for path in input_paths:
++        with open(path) as f:
++            lines.update(f.readlines())
++
++    for line in lines:
++        line = line.strip()
++        if line.endswith('/'):
++            line = line[:-1]
++        tpp_list.append(line)
+     tpp_strings = ',\n  '.join([json.dumps(tpp) for tpp in tpp_list])
+ 
+     output.write("""\
+ /* THIS FILE IS GENERATED BY ThirdPartyPaths.py - DO NOT EDIT */
+ 
+ #include <stdint.h>
+ 
+ const char* MOZ_THIRD_PARTY_PATHS[] = {
+diff --git a/build/clang-plugin/import_mozilla_checks.py b/build/clang-plugin/import_mozilla_checks.py
+--- a/build/clang-plugin/import_mozilla_checks.py
++++ b/build/clang-plugin/import_mozilla_checks.py
+@@ -91,18 +91,20 @@ def add_item_to_cmake_section(cmake_path
+             f.write(line)
+ 
+     f.close()
+ 
+ 
+ def write_third_party_paths(mozilla_path, module_path):
+     tpp_txt = os.path.join(
+         mozilla_path, '../../tools/rewriting/ThirdPartyPaths.txt')
++    generated_txt = os.path.join(
++        mozilla_path, '../../tools/rewriting/Generated.txt')
+     with open(os.path.join(module_path, 'ThirdPartyPaths.cpp'), 'w') as f:
+-        ThirdPartyPaths.generate(f, tpp_txt)
++        ThirdPartyPaths.generate(f, tpp_txt, generated_txt)
+ 
+ 
+ def do_import(mozilla_path, clang_tidy_path):
+     module = 'mozilla'
+     module_path = os.path.join(clang_tidy_path, module)
+     if not os.path.isdir(module_path):
+         os.mkdir(module_path)
+ 
+diff --git a/build/clang-plugin/moz.build b/build/clang-plugin/moz.build
+--- a/build/clang-plugin/moz.build
++++ b/build/clang-plugin/moz.build
+@@ -50,16 +50,17 @@ if CONFIG['ENABLE_MOZSEARCH_PLUGIN']:
+         'mozsearch-plugin/StringOperations.cpp',
+     ]
+ 
+ GENERATED_FILES += ['ThirdPartyPaths.cpp']
+ third_party_paths = GENERATED_FILES['ThirdPartyPaths.cpp']
+ third_party_paths.script = "ThirdPartyPaths.py:generate"
+ third_party_paths.inputs = [
+     '/tools/rewriting/ThirdPartyPaths.txt',
++    '/tools/rewriting/Generated.txt',
+ ]
+ 
+ HOST_COMPILE_FLAGS['STL'] = []
+ HOST_COMPILE_FLAGS['VISIBILITY'] = []
+ 
+ # libc++ is required to build plugins against clang on OS X.
+ if CONFIG['HOST_OS_ARCH'] == 'Darwin':
+     HOST_CXXFLAGS += ['-stdlib=libc++']
+diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
++++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+@@ -687,20 +687,21 @@ class StaticAnalysis(MachCommandBase):
+             if rc != 0:
+                 return rc
+         rc = self._get_infer(verbose=verbose)
+         if rc != 0:
+             self.log(logging.WARNING, 'static-analysis', {},
+                      'This command is only available for linux64!')
+             return rc
+         # which checkers to use, and which folders to exclude
+-        all_checkers, third_party_path = self._get_infer_config()
++        all_checkers, third_party_path, generated_path = self._get_infer_config()
+         checkers, excludes = self._get_infer_args(
+             checks=checks or all_checkers,
+-            third_party_path=third_party_path
++            third_party_path=third_party_path,
++            generated_path=generated_path
+         )
+         rc = rc or self._gradle(['clean'])  # clean so that we can recompile
+         # infer capture command
+         capture_cmd = [self._infer_path, 'capture'] + excludes + ['--']
+         rc = rc or self._gradle([task], infer_args=capture_cmd, verbose=verbose)
+         tmp_file, args = self._get_infer_source_args(java_sources)
+         # infer analyze command
+         analysis_cmd = [self._infer_path, 'analyze', '--keep-going'] +  \
+@@ -751,33 +752,35 @@ class StaticAnalysis(MachCommandBase):
+         with open(mozpath.join(self.topsrcdir, 'tools',
+                                'infer', 'config.yaml')) as f:
+             try:
+                 config = yaml.safe_load(f)
+                 for item in config['infer_checkers']:
+                     if item['publish']:
+                         checkers.append(item['name'])
+                 tp_path = mozpath.join(self.topsrcdir, config['third_party'])
++                generated_path = mozpath.join(self.topsrcdir, config['generated'])
+             except Exception:
+                 print('Looks like config.yaml is not valid, so we are unable '
+                       'to determine default checkers, and which folder to '
+                       'exclude, using defaults provided by infer')
+-        return checkers, tp_path
++        return checkers, tp_path, generated_path
+ 
+-    def _get_infer_args(self, checks, third_party_path):
++    def _get_infer_args(self, checks, *input_paths):
+         '''Return the arguments which include the checkers <checks>, and
+         excludes all folder in <third_party_path>.'''
+         checkers = ['-a', 'checkers']
+         excludes = []
+         for checker in checks:
+             checkers.append('--' + checker)
+-        with open(third_party_path) as f:
+-            for line in f:
+-                excludes.append('--skip-analysis-in-path')
+-                excludes.append(line.strip('\n'))
++        for path in input_paths:
++            with open(path) as f:
++                for line in f:
++                    excludes.append('--skip-analysis-in-path')
++                    excludes.append(line.strip('\n'))
+         return checkers, excludes
+ 
+     def _get_clang_tidy_config(self):
+         try:
+             file_handler = open(mozpath.join(self.topsrcdir, "tools", "clang-tidy", "config.yaml"))
+             config = yaml.safe_load(file_handler)
+         except Exception:
+             self.log(logging.ERROR, 'static-analysis', {},
+diff --git a/python/mozbuild/mozbuild/controller/building.py b/python/mozbuild/mozbuild/controller/building.py
+--- a/python/mozbuild/mozbuild/controller/building.py
++++ b/python/mozbuild/mozbuild/controller/building.py
+@@ -1203,20 +1203,26 @@ class BuildDriver(MozbuildObject):
+             # until we suppress them for real.
+             # TODO remove entries/feature once we stop generating warnings
+             # in these directories.
+             pathToThirdparty = os.path.join(self.topsrcdir,
+                                             "tools",
+                                             "rewriting",
+                                             "ThirdPartyPaths.txt")
+ 
++            pathToGenerated = os.path.join(self.topsrcdir,
++                                           "tools",
++                                           "rewriting",
++                                           "Generated.txt")
++
+             if os.path.exists(pathToThirdparty):
+-                with open(pathToThirdparty) as f:
++                with open(pathToThirdparty) as f, open(pathToGenerated) as g:
+                     # Normalize the path (no trailing /)
+-                    LOCAL_SUPPRESS_DIRS = tuple(d.rstrip('/') for d in f.read().splitlines())
++                    suppress = f.readlines() + g.readlines()
++                    LOCAL_SUPPRESS_DIRS = tuple(s.strip('/') for s in suppress)
+             else:
+                 # For application based on gecko like thunderbird
+                 LOCAL_SUPPRESS_DIRS = ()
+ 
+             suppressed_by_dir = Counter()
+ 
+             for warning in sorted(monitor.instance_warnings):
+                 path = mozpath.normsep(warning['filename'])
+diff --git a/tools/infer/config.yaml b/tools/infer/config.yaml
+--- a/tools/infer/config.yaml
++++ b/tools/infer/config.yaml
+@@ -16,8 +16,9 @@ infer_checkers:
+   - name: litho
+     publish: !!bool yes
+   - name: racerd
+     publish: !!bool yes
+   - name: liveness
+     publish: !!bool yes
+ # Third party files from mozilla-central
+ third_party: tools/rewriting/ThirdPartyPaths.txt
++generated: tools/rewriting/Generated.txt
+\ No newline at end of file
+diff --git a/tools/lint/mach_commands.py b/tools/lint/mach_commands.py
+--- a/tools/lint/mach_commands.py
++++ b/tools/lint/mach_commands.py
+@@ -17,17 +17,20 @@ from mozbuild.base import (
+ from mach.decorators import (
+     CommandArgument,
+     CommandProvider,
+     Command,
+ )
+ 
+ 
+ here = os.path.abspath(os.path.dirname(__file__))
+-THIRD_PARTY_PATHS = os.path.join('tools', 'rewriting', 'ThirdPartyPaths.txt')
++EXCLUSION_FILES = [
++    os.path.join('tools', 'rewriting', 'Generated.txt'),
++    os.path.join('tools', 'rewriting', 'ThirdPartyPaths.txt'),
++]
+ GLOBAL_EXCLUDES = [
+     'node_modules',
+     'tools/lint/test/files',
+ ]
+ 
+ 
+ def setup_argument_parser():
+     from mozlint import cli
+@@ -37,19 +40,20 @@ def setup_argument_parser():
+ def get_global_excludes(topsrcdir):
+     # exclude misc paths
+     excludes = GLOBAL_EXCLUDES[:]
+ 
+     # exclude top level paths that look like objdirs
+     excludes.extend([name for name in os.listdir(topsrcdir)
+                      if name.startswith('obj') and os.path.isdir(name)])
+ 
+-    # exclude third party paths
+-    with open(os.path.join(topsrcdir, THIRD_PARTY_PATHS), 'r') as fh:
+-        excludes.extend([f.strip() for f in fh.readlines()])
++    for path in EXCLUSION_FILES:
++        # exclude third party paths
++        with open(os.path.join(topsrcdir, path), 'r') as fh:
++            excludes.extend([f.strip() for f in fh.readlines()])
+ 
+     return excludes
+ 
+ 
+ @CommandProvider
+ class MachCommands(MachCommandBase):
+ 
+     @Command(
+@@ -68,17 +72,18 @@ class MachCommands(MachCommandBase):
+             buildargs['topobjdir'] = self.topobjdir
+             lintargs.update(buildargs)
+         except BuildEnvironmentNotFoundException:
+             pass
+ 
+         lintargs.setdefault('root', self.topsrcdir)
+         lintargs['exclude'] = get_global_excludes(lintargs['root'])
+         cli.SEARCH_PATHS.append(here)
+-        parser.GLOBAL_SUPPORT_FILES.append(os.path.join(self.topsrcdir, THIRD_PARTY_PATHS))
++        for path in EXCLUSION_FILES:
++            parser.GLOBAL_SUPPORT_FILES.append(os.path.join(self.topsrcdir, path))
+         return cli.run(*runargs, **lintargs)
+ 
+     @Command('eslint', category='devenv',
+              description='Run eslint or help configure eslint for optimal development.')
+     @CommandArgument('paths', default=None, nargs='*',
+                      help="Paths to file or directories to lint, like "
+                           "'browser/' Defaults to the "
+                           "current directory if not given.")
+diff --git a/tools/rewriting/Generated.txt b/tools/rewriting/Generated.txt
+new file mode 100644
+--- /dev/null
++++ b/tools/rewriting/Generated.txt
+@@ -0,0 +1,7 @@
++browser/components/newtab/node_modules/
++devtools/client/aboutdebugging/test/jest/node_modules/
++devtools/client/application/test/components/node_modules/
++devtools/client/debugger/node_modules/
++dom/tests/ajax/jquery/
++dom/tests/ajax/mochikit/
++node_modules/

+ 21 - 0
mozilla-release/patches/1577726-5-71a1.patch

@@ -0,0 +1,21 @@
+# HG changeset patch
+# User Sylvestre Ledru <sledru@mozilla.com>
+# Date 1568018098 0
+# Node ID 4c1c88bcac8b4124e6e03595a02dc4bf1e6b3f5e
+# Parent  6fcbe662e4787b65ad9c42e9505073ccc6514a06
+Bug 1577726 - Move a path from tools/rewriting/ThirdPartyPaths.txt to tools/rewriting/Generated.txt r=andi
+
+Differential Revision: https://phabricator.services.mozilla.com/D45158
+
+diff --git a/tools/rewriting/Generated.txt b/tools/rewriting/Generated.txt
+--- a/tools/rewriting/Generated.txt
++++ b/tools/rewriting/Generated.txt
+@@ -1,7 +1,8 @@
++browser/components/newtab/logs/
+ browser/components/newtab/node_modules/
+ devtools/client/aboutdebugging/test/jest/node_modules/
+ devtools/client/application/test/components/node_modules/
+ devtools/client/debugger/node_modules/
+ dom/tests/ajax/jquery/
+ dom/tests/ajax/mochikit/
+ node_modules/

+ 67 - 0
mozilla-release/patches/1577726-6-71a1.patch

@@ -0,0 +1,67 @@
+# HG changeset patch
+# User Sylvestre Ledru <sledru@mozilla.com>
+# Date 1568018023 0
+# Node ID 29a4f1f27dde683b3e149ef98b6317e600c694f7
+# Parent  8c7db053e78bfeae5981373b99b101a0b82ffa23
+Bug 1577726 - Reorder tools/rewriting/ThirdPartyPaths.txt r=andi
+
+Depends on D45158
+
+Differential Revision: https://phabricator.services.mozilla.com/D45160
+
+diff --git a/tools/lint/docs/index.rst b/tools/lint/docs/index.rst
+--- a/tools/lint/docs/index.rst
++++ b/tools/lint/docs/index.rst
+@@ -13,17 +13,17 @@ 1. It provides a standard method for add
+    defining a config object in a ``.yml`` file. This helps keep lint related code localized, and
+    prevents different teams from coming up with their own unique lint implementations.
+ 2. It provides a streamlined interface for running all linters at once. Instead of running N
+    different lint commands to test your patch, a single ``mach lint`` command will automatically run
+    all applicable linters. This means there is a single API surface that other tools can use to
+    invoke linters.
+ 
+ ``Mozlint`` isn't designed to be used directly by end users. Instead, it can be consumed by things
+-like mach, mozreview and taskcluster.
++like mach, phabricator and taskcluster.
+ 
+ .. toctree::
+   :caption: Linting User Guide
+   :maxdepth: 2
+ 
+   usage
+   create
+   linters/eslint
+diff --git a/tools/rewriting/ThirdPartyPaths.txt b/tools/rewriting/ThirdPartyPaths.txt
+--- a/tools/rewriting/ThirdPartyPaths.txt
++++ b/tools/rewriting/ThirdPartyPaths.txt
+@@ -1,10 +1,12 @@
+ browser/components/translation/cld2/
++build/pymake
+ devtools/client/debugger/flow-typed/
++devtools/shared/jsbeautify/
+ extensions/spellcheck/hunspell/src/
+ gfx/angle/
+ gfx/cairo/
+ gfx/graphite2/
+ gfx/harfbuzz/
+ gfx/ots/
+ gfx/qcms/
+ gfx/sfntly/
+@@ -15,16 +17,17 @@ gfx/webrender_api
+ gfx/wrench/
+ gfx/ycbcr/
+ intl/hyphenation/hyphen/
+ intl/icu/
+ ipc/chromium/
+ js/src/ctypes/libffi/
+ js/src/dtoa.c
+ js/src/jit/arm64/vixl/
++js/src/vtune/ittnotify_config.h
+ media/ffvpx/
+ media/gmp-clearkey/0.1/openaes/
+ media/kiss_fft/
+ media/libav/
+ media/libcubeb/
+ media/libjpeg/
+ media/libmkv/
+ media/libnestegg/

+ 4 - 4
mozilla-release/patches/1579845-6-71a1.patch

@@ -2,7 +2,7 @@
 # User Sylvestre Ledru <sledru@mozilla.com>
 # Date 1569851095 0
 # Node ID 1e0061521d8669f562e052fc944d62b2ab790309
-# Parent  1b0a1c227be852993cd9866215aad8b7eb76f519
+# Parent  f103cdceb857568c5323c361cfeebe597a2122dc
 Bug 1579845 - ride along: codespell Add support of exclude: r=ahal
 
 Differential Revision: https://phabricator.services.mozilla.com/D45489
@@ -10,8 +10,8 @@ Differential Revision: https://phabricator.services.mozilla.com/D45489
 diff --git a/tools/lint/spell/__init__.py b/tools/lint/spell/__init__.py
 --- a/tools/lint/spell/__init__.py
 +++ b/tools/lint/spell/__init__.py
-@@ -103,29 +103,30 @@ def lint(paths, config, fix=None, **lint
- 
+@@ -105,29 +105,30 @@ def lint(paths, config, fix=None, **lint
+     binary = get_codespell_binary()
      if not binary:
          print(CODESPELL_NOT_FOUND)
          if 'MOZ_AUTOMATION' in os.environ:
@@ -39,8 +39,8 @@ diff --git a/tools/lint/spell/__init__.py b/tools/lint/spell/__init__.py
  
      if fix:
          cmd_args.append('--write-changes')
+     log.debug("Command: {}".format(' '.join(cmd_args)))
  
      base_command = cmd_args + paths
  
      run_process(config, base_command)
-     return results

+ 0 - 1128
mozilla-release/patches/1580280-7-71a1.patch

@@ -1,1128 +0,0 @@
-# HG changeset patch
-# User Andrew Halberstadt <ahalberstadt@mozilla.com>
-# Date 1569856181 0
-# Node ID fbc81f84273941e9f7b3ccbcbb5bfe9201d2f6af
-# Parent  32d0532726fd2adae64f484d026375f8a27a36eb
-Bug 1580280 - [mozlint] Run |mach lint| with Python 3 and drop support for Python 2 r=mars
-
-Differential Revision: https://phabricator.services.mozilla.com/D45441
-
-diff --git a/mach b/mach
---- a/mach
-+++ b/mach
-@@ -32,17 +32,16 @@ py2commands="
-     cppunittest
-     cramtest
-     crashtest
-     devtools-css-db
-     doc
-     doctor
-     empty-makefiles
-     environment
--    eslint
-     file-info
-     firefox-ui-functional
-     fluent-migration-test
-     geckodriver
-     geckodriver-test
-     geckoview-junit
-     gradle
-     gtest
-@@ -50,17 +49,16 @@ py2commands="
-     import-pr
-     install
-     install-android
-     install-desktop
-     jsapi-tests
-     jsshell-bench
-     jstestbrowser
-     jstests
--    lint
-     marionette-test
-     mochitest
-     mozbuild-reference
-     mozharness
-     mozregression
-     package
-     package-multi-locale
-     pastebin
-diff --git a/python/mozlint/mozlint/__init__.py b/python/mozlint/mozlint/__init__.py
---- a/python/mozlint/mozlint/__init__.py
-+++ b/python/mozlint/mozlint/__init__.py
-@@ -1,9 +1,7 @@
- # 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/.
- # flake8: noqa
- 
--from __future__ import absolute_import
--
- from .roller import LintRoller
- from .result import Issue
-diff --git a/python/mozlint/mozlint/cli.py b/python/mozlint/mozlint/cli.py
---- a/python/mozlint/mozlint/cli.py
-+++ b/python/mozlint/mozlint/cli.py
-@@ -1,14 +1,12 @@
- # 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 os
- import sys
- from argparse import REMAINDER, ArgumentParser
- 
- from mozlint.formatters import all_formatters
- 
- SEARCH_PATHS = []
- 
-@@ -214,21 +212,16 @@ def run(paths, linters, formats, outgoin
-     if edit and result.issues:
-         edit_issues(result)
-         result = lint.roll(result.issues.keys())
- 
-     for formatter_name, path in formats:
-         formatter = formatters.get(formatter_name)
- 
-         out = formatter(result)
--        if sys.version_info[0] == 2:
--            # Encode output with 'replace' to avoid UnicodeEncodeErrors on
--            # environments that aren't using utf-8.
--            out = formatter(result).encode(sys.stdout.encoding or 'ascii', 'replace')
--
-         if out:
-             output_file = open(path, 'w') if path else sys.stdout
-             print(out, file=output_file)
- 
-     return result.returncode
- 
- 
- if __name__ == '__main__':
-diff --git a/python/mozlint/mozlint/editor.py b/python/mozlint/mozlint/editor.py
---- a/python/mozlint/mozlint/editor.py
-+++ b/python/mozlint/mozlint/editor.py
-@@ -1,14 +1,12 @@
- # 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, print_function
--
- import os
- import subprocess
- import tempfile
- 
- from mozlint import formatters
- 
- 
- def get_editor():
-diff --git a/python/mozlint/mozlint/errors.py b/python/mozlint/mozlint/errors.py
---- a/python/mozlint/mozlint/errors.py
-+++ b/python/mozlint/mozlint/errors.py
-@@ -1,14 +1,12 @@
- # 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
--
- 
- class LintException(Exception):
-     pass
- 
- 
- class LinterNotFound(LintException):
-     def __init__(self, path):
-         LintException.__init__(self, "Could not find lint file '{}'".format(path))
-diff --git a/python/mozlint/mozlint/formatters/__init__.py b/python/mozlint/mozlint/formatters/__init__.py
---- a/python/mozlint/mozlint/formatters/__init__.py
-+++ b/python/mozlint/mozlint/formatters/__init__.py
-@@ -1,14 +1,12 @@
- # 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
- 
- from ..result import IssueEncoder
- from .compact import CompactFormatter
- from .stylish import StylishFormatter
- from .summary import SummaryFormatter
- from .treeherder import TreeherderFormatter
- from .unix import UnixFormatter
-diff --git a/python/mozlint/mozlint/formatters/compact.py b/python/mozlint/mozlint/formatters/compact.py
---- a/python/mozlint/mozlint/formatters/compact.py
-+++ b/python/mozlint/mozlint/formatters/compact.py
-@@ -1,14 +1,12 @@
- # 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 ..result import Issue
- 
- 
- class CompactFormatter(object):
-     """Formatter for compact output.
- 
-     This formatter prints one error per line, mimicking the
-     eslint 'compact' formatter.
-diff --git a/python/mozlint/mozlint/formatters/stylish.py b/python/mozlint/mozlint/formatters/stylish.py
---- a/python/mozlint/mozlint/formatters/stylish.py
-+++ b/python/mozlint/mozlint/formatters/stylish.py
-@@ -1,14 +1,12 @@
- # 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 mozterm import Terminal
- 
- from ..result import Issue
- from ..util.string import pluralize
- 
- 
- class StylishFormatter(object):
-     """Formatter based on the eslint default."""
-diff --git a/python/mozlint/mozlint/formatters/summary.py b/python/mozlint/mozlint/formatters/summary.py
---- a/python/mozlint/mozlint/formatters/summary.py
-+++ b/python/mozlint/mozlint/formatters/summary.py
-@@ -1,14 +1,12 @@
- # 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
--
- import os
- from collections import defaultdict
- 
- import mozpack.path as mozpath
- 
- from ..util.string import pluralize
- 
- 
-diff --git a/python/mozlint/mozlint/formatters/treeherder.py b/python/mozlint/mozlint/formatters/treeherder.py
---- a/python/mozlint/mozlint/formatters/treeherder.py
-+++ b/python/mozlint/mozlint/formatters/treeherder.py
-@@ -1,14 +1,12 @@
- # 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 ..result import Issue
- 
- 
- class TreeherderFormatter(object):
-     """Formatter for treeherder friendly output.
- 
-     This formatter looks ugly, but prints output such that
-     treeherder is able to highlight the errors and warnings.
-diff --git a/python/mozlint/mozlint/formatters/unix.py b/python/mozlint/mozlint/formatters/unix.py
---- a/python/mozlint/mozlint/formatters/unix.py
-+++ b/python/mozlint/mozlint/formatters/unix.py
-@@ -1,14 +1,12 @@
- # 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
--
- import os
- 
- from ..result import Issue
- 
- 
- class UnixFormatter(object):
-     """Formatter that respects Unix output conventions frequently
-     employed by preprocessors and compilers.  The format is
-diff --git a/python/mozlint/mozlint/pathutils.py b/python/mozlint/mozlint/pathutils.py
---- a/python/mozlint/mozlint/pathutils.py
-+++ b/python/mozlint/mozlint/pathutils.py
-@@ -1,14 +1,12 @@
- # 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 unicode_literals, absolute_import
--
- import os
- 
- from mozpack import path as mozpath
- from mozpack.files import FileFinder
- 
- 
- class FilterPath(object):
-     """Helper class to make comparing and matching file paths easier."""
-diff --git a/python/mozlint/mozlint/result.py b/python/mozlint/mozlint/result.py
---- a/python/mozlint/mozlint/result.py
-+++ b/python/mozlint/mozlint/result.py
-@@ -1,14 +1,12 @@
- # 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 collections import defaultdict
- from json import dumps, JSONEncoder
- import os
- 
- 
- class ResultSummary(object):
-     """Represents overall result state from an entire lint run."""
-     root = None
-diff --git a/python/mozlint/mozlint/roller.py b/python/mozlint/mozlint/roller.py
---- a/python/mozlint/mozlint/roller.py
-+++ b/python/mozlint/mozlint/roller.py
-@@ -1,32 +1,28 @@
- # 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 atexit
- import copy
- import logging
- import os
- import signal
- import sys
- import time
- import traceback
- from concurrent.futures import ProcessPoolExecutor
-+from concurrent.futures.process import _python_exit as futures_atexit
- from itertools import chain
- from math import ceil
--from multiprocessing import cpu_count
-+from multiprocessing import cpu_count, get_context
- from multiprocessing.queues import Queue
- from subprocess import CalledProcessError
- 
--try:
--    from multiprocessing import get_context
--except ImportError:
--    get_context = None
--
- import mozpack.path as mozpath
- from mozversioncontrol import get_repository_object, MissingUpstreamRepo, InvalidRepoPath
- 
- from .errors import LintersNotConfigured
- from .parser import Parser
- from .pathutils import findobject
- from .result import ResultSummary
- from .types import supported_types
-@@ -84,18 +80,17 @@ def _run_worker(config, paths, **lintarg
- class InterruptableQueue(Queue):
-     """A multiprocessing.Queue that catches KeyboardInterrupt when a worker is
-     blocking on it and returns None.
- 
-     This is needed to gracefully handle KeyboardInterrupts when a worker is
-     blocking on ProcessPoolExecutor's call queue.
-     """
-     def __init__(self, *args, **kwargs):
--        if get_context:
--            kwargs['ctx'] = get_context()
-+        kwargs['ctx'] = get_context()
-         super(InterruptableQueue, self).__init__(*args, **kwargs)
- 
-     def get(self, *args, **kwargs):
-         try:
-             return Queue.get(self, *args, **kwargs)
-         except KeyboardInterrupt:
-             return None
- 
-@@ -106,16 +101,34 @@ def _worker_sigint_handler(signum, frame
-     Tells workers not to process the extra jobs on the call queue that couldn't
-     be canceled by the parent process.
-     """
-     global SHUTDOWN
-     SHUTDOWN = True
-     orig_sigint(signum, frame)
- 
- 
-+def wrap_futures_atexit():
-+    """Sometimes futures' atexit handler can spew tracebacks. This wrapper
-+    suppresses them."""
-+    try:
-+        futures_atexit()
-+    except Exception:
-+        # Generally `atexit` handlers aren't supposed to raise exceptions, but the
-+        # futures' handler can sometimes raise when the user presses `CTRL-C`. We
-+        # suppress all possible exceptions here so users have a nice experience
-+        # when canceling their lint run. Any exceptions raised by this function
-+        # won't be useful anyway.
-+        pass
-+
-+
-+atexit.unregister(futures_atexit)
-+atexit.register(wrap_futures_atexit)
-+
-+
- class LintRoller(object):
-     """Registers and runs linters.
- 
-     :param root: Path to which relative paths will be joined. If
-                  unspecified, root will either be determined from
-                  version control or cwd.
-     :param lintargs: Arguments to pass to the underlying linter(s).
-     """
-diff --git a/python/mozlint/mozlint/types.py b/python/mozlint/mozlint/types.py
---- a/python/mozlint/mozlint/types.py
-+++ b/python/mozlint/mozlint/types.py
-@@ -1,23 +1,20 @@
- # 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
--
- import os
- import re
- import sys
- from abc import ABCMeta, abstractmethod
- 
- from mozlog import get_default_logger, commandline, structuredlog
- from mozlog.reader import LogHandler
- from mozpack.files import FileFinder
--from six import PY2
- 
- from . import result
- from .pathutils import expand_exclusions, filterpaths, findobject
- 
- 
- class BaseType(object):
-     """Abstract base class for all types of linters."""
-     __metaclass__ = ABCMeta
-@@ -99,18 +96,17 @@ class LineType(BaseType):
-                 errors.extend(self._lint(os.path.join(path, p), config, **lintargs))
-         return errors
- 
-     def _lint(self, path, config, **lintargs):
-         if os.path.isdir(path):
-             return self._lint_dir(path, config, **lintargs)
- 
-         payload = config['payload']
--        kwargs = {} if PY2 else {'errors': 'replace'}
--        with open(path, 'r', **kwargs) as fh:
-+        with open(path, 'r', errors='replace') as fh:
-             lines = fh.readlines()
- 
-         errors = []
-         for i, line in enumerate(lines):
-             if self.condition(payload, line):
-                 errors.append(result.from_config(config, path=path, lineno=i+1))
- 
-         return errors
-diff --git a/python/mozlint/mozlint/util/pip.py b/python/mozlint/mozlint/util/pip.py
---- a/python/mozlint/mozlint/util/pip.py
-+++ b/python/mozlint/mozlint/util/pip.py
-@@ -1,15 +1,12 @@
- # 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
--from __future__ import absolute_import
--
- import subprocess
- 
- 
- def _run_pip(*args):
-     """
-     Helper function that runs pip with subprocess
-     """
-     try:
-diff --git a/python/mozlint/mozlint/util/string.py b/python/mozlint/mozlint/util/string.py
---- a/python/mozlint/mozlint/util/string.py
-+++ b/python/mozlint/mozlint/util/string.py
-@@ -1,11 +1,9 @@
- # 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
--
- 
- def pluralize(s, num):
-     if num != 1:
-         s += 's'
-     return str(num) + ' ' + s
-diff --git a/python/mozlint/setup.py b/python/mozlint/setup.py
---- a/python/mozlint/setup.py
-+++ b/python/mozlint/setup.py
-@@ -1,14 +1,12 @@
- # 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 setuptools import setup
- 
- VERSION = 0.1
- DEPS = ["mozlog>=3.4"]
- 
- setup(
-     name='mozlint',
-     description='Framework for registering and running micro lints',
-diff --git a/python/mozlint/test/conftest.py b/python/mozlint/test/conftest.py
---- a/python/mozlint/test/conftest.py
-+++ b/python/mozlint/test/conftest.py
-@@ -1,14 +1,12 @@
- # 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 sys
- from argparse import Namespace
- 
- import pytest
- 
- from mozlint import LintRoller
- 
-diff --git a/python/mozlint/test/linters/external.py b/python/mozlint/test/linters/external.py
---- a/python/mozlint/test/linters/external.py
-+++ b/python/mozlint/test/linters/external.py
-@@ -1,14 +1,12 @@
- # 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 time
- 
- from mozlint import result
- from mozlint.errors import LintException
- 
- 
- def badreturncode(files, config, **lintargs):
-diff --git a/python/mozlint/test/linters/global_payload.py b/python/mozlint/test/linters/global_payload.py
---- a/python/mozlint/test/linters/global_payload.py
-+++ b/python/mozlint/test/linters/global_payload.py
-@@ -1,14 +1,12 @@
- # 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
--
- from mozlint import result
- from mozpack.files import FileFinder
- import mozpack.path as mozpath
- 
- from external import external
- 
- 
- def global_payload(config, **lintargs):
-diff --git a/python/mozlint/test/python.ini b/python/mozlint/test/python.ini
---- a/python/mozlint/test/python.ini
-+++ b/python/mozlint/test/python.ini
-@@ -1,10 +1,11 @@
- [DEFAULT]
- subsuite = mozlint, os == "linux"
-+skip-if = python == 2
- 
- [test_cli.py]
- [test_editor.py]
- [test_formatters.py]
- [test_parser.py]
- [test_pathutils.py]
- [test_result.py]
- [test_roller.py]
-diff --git a/python/mozlint/test/runcli.py b/python/mozlint/test/runcli.py
---- a/python/mozlint/test/runcli.py
-+++ b/python/mozlint/test/runcli.py
-@@ -1,20 +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/.
- 
--from __future__ import absolute_import
--
- import os
- import sys
- 
-+from mozlint import cli
-+
- here = os.path.abspath(os.path.dirname(__file__))
--sys.path.insert(0, os.path.join(os.path.dirname(here), 'mozlint'))
--
--from mozlint import cli
- cli.SEARCH_PATHS.append(os.path.join(here, 'linters'))
- 
- if __name__ == '__main__':
-     parser = cli.MozlintParser()
-     args = vars(parser.parse_args(sys.argv[1:]))
-     args['root'] = here
-     sys.exit(cli.run(**args))
-diff --git a/python/mozlint/test/test_cli.py b/python/mozlint/test/test_cli.py
---- a/python/mozlint/test/test_cli.py
-+++ b/python/mozlint/test/test_cli.py
-@@ -1,14 +1,12 @@
- # 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 distutils.spawn import find_executable
- 
- import mozunit
- import pytest
- 
- from mozlint import cli
- 
-diff --git a/python/mozlint/test/test_editor.py b/python/mozlint/test/test_editor.py
---- a/python/mozlint/test/test_editor.py
-+++ b/python/mozlint/test/test_editor.py
-@@ -1,14 +1,12 @@
- # 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 subprocess
- 
- import mozunit
- import pytest
- 
- from mozlint import editor
- from mozlint.result import ResultSummary, Issue
-diff --git a/python/mozlint/test/test_formatters.py b/python/mozlint/test/test_formatters.py
---- a/python/mozlint/test/test_formatters.py
-+++ b/python/mozlint/test/test_formatters.py
-@@ -1,14 +1,12 @@
- # 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
--
- import json
- import os
- 
- import mozunit
- import mozpack.path as mozpath
- import pytest
- 
- from mozlint.result import Issue, ResultSummary
-diff --git a/python/mozlint/test/test_parser.py b/python/mozlint/test/test_parser.py
---- a/python/mozlint/test/test_parser.py
-+++ b/python/mozlint/test/test_parser.py
-@@ -1,14 +1,12 @@
- # 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 mozunit
- import pytest
- 
- from mozlint.parser import Parser
- from mozlint.errors import (
-     LinterNotFound,
-diff --git a/python/mozlint/test/test_pathutils.py b/python/mozlint/test/test_pathutils.py
---- a/python/mozlint/test/test_pathutils.py
-+++ b/python/mozlint/test/test_pathutils.py
-@@ -1,14 +1,12 @@
- # 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 fnmatch import fnmatch
- 
- import mozunit
- import pytest
- 
- from mozlint import pathutils
- 
-diff --git a/python/mozlint/test/test_result.py b/python/mozlint/test/test_result.py
---- a/python/mozlint/test/test_result.py
-+++ b/python/mozlint/test/test_result.py
-@@ -1,14 +1,12 @@
- # 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 mozunit
- 
- from mozlint.result import Issue
- 
- 
- def test_issue_defaults():
-     issue = Issue('linter', 'path', 'message', None)
-     assert issue.lineno == 0
-diff --git a/python/mozlint/test/test_roller.py b/python/mozlint/test/test_roller.py
---- a/python/mozlint/test/test_roller.py
-+++ b/python/mozlint/test/test_roller.py
-@@ -1,14 +1,12 @@
- # 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 platform
- import signal
- import subprocess
- import sys
- import time
- 
- import mozunit
-@@ -221,22 +219,25 @@ def test_max_paths_per_job_global(monkey
- @pytest.mark.skipif(platform.system() == 'Windows',
-                     reason="signal.CTRL_C_EVENT isn't causing a KeyboardInterrupt on Windows")
- def test_keyboard_interrupt():
-     # We use two linters so we'll have two jobs. One (string.yml) will complete
-     # quickly. The other (slow.yml) will run slowly.  This way the first worker
-     # will be be stuck blocking on the ProcessPoolExecutor._call_queue when the
-     # signal arrives and the other still be doing work.
-     cmd = [sys.executable, 'runcli.py', '-l=string', '-l=slow']
-+    env = os.environ.copy()
-+    env['PYTHONPATH'] = os.pathsep.join(sys.path)
-     proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
--                            cwd=here, universal_newlines=True)
-+                            cwd=here, env=env, universal_newlines=True)
-     time.sleep(1)
-     proc.send_signal(signal.SIGINT)
- 
-     out = proc.communicate()[0]
-+    print(out)
-     assert 'warning: not all files were linted' in out
-     assert '2 problems' in out
-     assert 'Traceback' not in out
- 
- 
- def test_support_files(lint, linters, filedir, monkeypatch):
-     jobs = []
- 
-diff --git a/python/mozlint/test/test_types.py b/python/mozlint/test/test_types.py
---- a/python/mozlint/test/test_types.py
-+++ b/python/mozlint/test/test_types.py
-@@ -1,14 +1,12 @@
- # 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 mozunit
- import pytest
- 
- from mozlint.result import Issue, ResultSummary
- 
- 
-diff --git a/tools/lint/cpp/mingw-capitalization.py b/tools/lint/cpp/mingw-capitalization.py
---- a/tools/lint/cpp/mingw-capitalization.py
-+++ b/tools/lint/cpp/mingw-capitalization.py
-@@ -1,14 +1,12 @@
- # 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 re
- 
- from mozlint.types import LineType
- 
- here = os.path.abspath(os.path.dirname(__file__))
- HEADERS_FILE = os.path.join(here, 'mingw-headers.txt')
- # generated by cd mingw-w64/mingw-w64-headers &&
-diff --git a/tools/lint/docs/conf.py b/tools/lint/docs/conf.py
---- a/tools/lint/docs/conf.py
-+++ b/tools/lint/docs/conf.py
-@@ -1,18 +1,16 @@
- # -*- coding: utf-8 -*-
- #
- # mozlint documentation build configuration file, created by
- # sphinx-quickstart on Fri Nov 27 17:38:49 2015.
- #
- # This file is execfile()d with the current directory set to its
- # containing dir.
- 
--from __future__ import absolute_import
--
- import os
- 
- # -- General configuration ------------------------------------------------
- 
- # Add any Sphinx extension module names here, as strings. They can be
- # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
- # ones.
- extensions = [
-diff --git a/tools/lint/eslint/setup_helper.py b/tools/lint/eslint/setup_helper.py
---- a/tools/lint/eslint/setup_helper.py
-+++ b/tools/lint/eslint/setup_helper.py
-@@ -1,16 +1,14 @@
- # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
- # vim: set filetype=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, print_function
--
- import json
- import os
- import platform
- import re
- import shutil
- import subprocess
- import sys
- import tempfile
-diff --git a/tools/lint/mach_commands.py b/tools/lint/mach_commands.py
---- a/tools/lint/mach_commands.py
-+++ b/tools/lint/mach_commands.py
-@@ -1,14 +1,12 @@
- # 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 copy
- import os
- 
- from mozbuild.base import (
-     BuildEnvironmentNotFoundException,
-     MachCommandBase,
- )
-diff --git a/tools/lint/py2.yml b/tools/lint/py2.yml
---- a/tools/lint/py2.yml
-+++ b/tools/lint/py2.yml
-@@ -28,14 +28,18 @@ py2:
-         - testing/mozharness
-         - testing/tools
-         - testing/web-platform
-         - toolkit
-         - tools/power/mach_commands.py
-         - tools/rb
-         - tools/update-packaging
-         - xpcom
-+
-+        # These paths are intentionally excluded (Python 3 only)
-+        - python/mozlint
-+        - tools/lint
-     extensions: ['py']
-     support-files:
-         - 'tools/lint/python/*compat*'
-     type: external
-     payload: python.compat:lintpy2
-     setup: python.compat:setuppy2
-diff --git a/tools/lint/python/check_compat.py b/tools/lint/python/check_compat.py
---- a/tools/lint/python/check_compat.py
-+++ b/tools/lint/python/check_compat.py
-@@ -1,15 +1,13 @@
- #!/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, print_function
--
- import ast
- import json
- import sys
- 
- 
- def parse_file(f):
-     with open(f, 'rb') as fh:
-         content = fh.read()
-diff --git a/tools/lint/python/compat.py b/tools/lint/python/compat.py
---- a/tools/lint/python/compat.py
-+++ b/tools/lint/python/compat.py
-@@ -1,14 +1,12 @@
- # 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 json
- import os
- from distutils.spawn import find_executable
- 
- import mozfile
- from mozprocess import ProcessHandlerMixin
- 
- from mozlint import result
-diff --git a/tools/lint/python/flake8.py b/tools/lint/python/flake8.py
---- a/tools/lint/python/flake8.py
-+++ b/tools/lint/python/flake8.py
-@@ -1,14 +1,12 @@
- # 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 json
- import os
- import platform
- import subprocess
- import sys
- 
- import mozfile
- 
-diff --git a/tools/lint/python/flake8_requirements.txt b/tools/lint/python/flake8_requirements.txt
---- a/tools/lint/python/flake8_requirements.txt
-+++ b/tools/lint/python/flake8_requirements.txt
-@@ -5,32 +5,16 @@ mccabe==0.6.1 \
-     --hash=sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42 \
-     --hash=sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f
- pyflakes==2.1.0 \
-     --hash=sha256:f277f9ca3e55de669fba45b7393a1449009cff5a37d1af10ebb76c52765269cd \
-     --hash=sha256:5e8c00e30c464c99e0b501dc160b13a14af7f27d4dffb529c556e30a159e231d
- pycodestyle==2.5.0 \
-     --hash=sha256:95a2219d12372f05704562a14ec30bc76b05a5b297b21a5dfe3f6fac3491ae56 \
-     --hash=sha256:e40a936c9a450ad81df37f549d676d127b1b66000a6c500caa2b085bc0ca976c
--enum34==1.1.6; python_version < '3.0' \
--    --hash=sha256:6bd0f6ad48ec2aa117d3d141940d484deccda84d4fcd884f5c3d93c23ecd8c79 \
--    --hash=sha256:644837f692e5f550741432dd3f223bbb9852018674981b1664e5dc339387588a \
--    --hash=sha256:8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1 \
--    --hash=sha256:2d81cbbe0e73112bdfe6ef8576f2238f2ba27dd0d55752a776c41d38b7da2850
--configparser==3.7.1; python_version < '3.0' \
--    --hash=sha256:c114ff90ee2e762db972fa205f02491b1f5cf3ff950decd8542c62970c9bedac \
--    --hash=sha256:df28e045fbff307a28795b18df6ac8662be3219435560ddb068c283afab1ea7a \
--    --hash=sha256:5bd5fa2a491dc3cfe920a3f2a107510d65eceae10e9c6e547b90261a4710df32
- setuptools==40.7.1 \
-     --hash=sha256:252520b7969fb4f2fcaf08c014b2891041d56f31180ec0d581297a28597205ff \
-     --hash=sha256:5926bbea397d0fcec2f7946f1691f5820ef0234247b2d5fa83d30cc216d613ec
- autopep8==1.4.3 \
-     --hash=sha256:33d2b5325b7e1afb4240814fe982eea3a92ebea712869bfd08b3c0393404248c
- entrypoints==0.3 \
-     --hash=sha256:589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19 \
-     --hash=sha256:c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451
--typing==3.6.6; python_version < '3.0' \
--    --hash=sha256:a4c8473ce11a65999c8f59cb093e70686b6c84c98df58c1dae9b3b196089858a \
--    --hash=sha256:57dcf675a99b74d64dacf6fba08fb17cf7e3d5fdff53d4a30ea2a5e7e52543d4 \
--    --hash=sha256:4027c5f6127a6267a435201981ba156de91ad0d1d98e9ddc2aa173453453492d
--functools32==3.2.3-2; python_version < '3.0' \
--    --hash=sha256:f6253dfbe0538ad2e387bd8fdfd9293c925d63553f5813c4e587745416501e6d \
--    --hash=sha256:89d824aa6c358c421a234d7f9ee0bd75933a67c29588ce50aaa3acdf4d403fa0
-diff --git a/tools/lint/rust/__init__.py b/tools/lint/rust/__init__.py
---- a/tools/lint/rust/__init__.py
-+++ b/tools/lint/rust/__init__.py
-@@ -1,19 +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/.
- 
--from __future__ import absolute_import, print_function
--from collections import namedtuple
--
- import os
- import signal
- import re
- import subprocess
-+from collections import namedtuple
- 
- from mozfile import which
- from mozlint import result
- from mozlint.pathutils import expand_exclusions
- from mozprocess import ProcessHandler
- 
- RUSTFMT_NOT_FOUND = """
- Could not find rustfmt! Install rustfmt and try again.
-diff --git a/tools/lint/shell/__init__.py b/tools/lint/shell/__init__.py
---- a/tools/lint/shell/__init__.py
-+++ b/tools/lint/shell/__init__.py
-@@ -1,23 +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/.
- 
--from __future__ import absolute_import, print_function
--
- import os
- import json
- import signal
--
--# py2-compat
--try:
--    from json.decoder import JSONDecodeError
--except ImportError:
--    JSONDecodeError = ValueError
-+from json.decoder import JSONDecodeError
- 
- import mozpack.path as mozpath
- from mozfile import which
- from mozlint import result
- from mozpack.files import FileFinder
- from mozprocess import ProcessHandlerMixin
- 
- 
-diff --git a/tools/lint/spell/__init__.py b/tools/lint/spell/__init__.py
---- a/tools/lint/spell/__init__.py
-+++ b/tools/lint/spell/__init__.py
-@@ -1,29 +1,26 @@
- # 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 signal
- import re
- 
- # py2-compat
- try:
-     from json.decoder import JSONDecodeError
- except ImportError:
-     JSONDecodeError = ValueError
- 
- from mozfile import which
- from mozlint import result
- from mozlint.util import pip
- from mozprocess import ProcessHandlerMixin
--from six import PY3
- 
- here = os.path.abspath(os.path.dirname(__file__))
- CODESPELL_REQUIREMENTS_PATH = os.path.join(here, 'codespell_requirements.txt')
- 
- CODESPELL_NOT_FOUND = """
- Could not find codespell! Install codespell and try again.
- 
-     $ pip install -U --require-hashes -r {}
-@@ -41,17 +38,17 @@ results = []
- CODESPELL_FORMAT_REGEX = re.compile(r'(.*):(.*): (.*) ==> (.*)$')
- 
- 
- class CodespellProcess(ProcessHandlerMixin):
-     def __init__(self, config, *args, **kwargs):
-         self.config = config
-         kwargs = {
-             'processOutputLine': [self.process_line],
--            'universal_newlines': PY3,
-+            'universal_newlines': True,
-         }
-         ProcessHandlerMixin.__init__(self, *args, **kwargs)
- 
-     def process_line(self, line):
-         try:
-             match = CODESPELL_FORMAT_REGEX.match(line)
-             abspath, line, typo, correct = match.groups()
-         except AttributeError:
-diff --git a/tools/lint/test/python.ini b/tools/lint/test/python.ini
---- a/tools/lint/test/python.ini
-+++ b/tools/lint/test/python.ini
-@@ -1,7 +1,8 @@
- [DEFAULT]
- subsuite=mozlint, os == "linux"
-+skip-if = python == 2
- 
- [test_eslint.py]
- skip-if = os == "win"  # node not installed on worker
- [test_flake8.py]
- requirements = tools/lint/python/flake8_requirements.txt
-diff --git a/tools/lint/test/test_eslint.py.1559975.later b/tools/lint/test/test_eslint.py.1559975.later
-deleted file mode 100644
---- a/tools/lint/test/test_eslint.py.1559975.later
-+++ /dev/null
-@@ -1,13 +0,0 @@
----- test_eslint.py
--+++ test_eslint.py
--@@ -1,8 +1,10 @@
--+from __future__ import absolute_import, print_function
--+
-- import mozunit
-- 
-- from conftest import build
-- 
-- LINTER = 'eslint'
-- 
-- 
-- def test_lint_with_global_exclude(lint, config, paths):
-diff --git a/tools/lint/test/test_flake8.py b/tools/lint/test/test_flake8.py
---- a/tools/lint/test/test_flake8.py
-+++ b/tools/lint/test/test_flake8.py
-@@ -1,10 +1,8 @@
--from __future__ import absolute_import, print_function
--
- import os
- 
- import mozunit
- 
- LINTER = 'flake8'
- 
- 
- def test_lint_single_file(lint, paths):
-diff --git a/tools/lint/yamllint_/__init__.py b/tools/lint/yamllint_/__init__.py
---- a/tools/lint/yamllint_/__init__.py
-+++ b/tools/lint/yamllint_/__init__.py
-@@ -1,26 +1,22 @@
- # 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 re
- import os
- import signal
- import subprocess
- from collections import defaultdict
- 
- from mozfile import which
- from mozlint import result
- from mozlint.pathutils import get_ancestors_by_name
- from mozprocess import ProcessHandlerMixin
--from six import string_types
--
- 
- here = os.path.abspath(os.path.dirname(__file__))
- YAMLLINT_REQUIREMENTS_PATH = os.path.join(here, 'yamllint_requirements.txt')
- 
- 
- YAMLLINT_INSTALL_ERROR = """
- Unable to install correct version of yamllint
- Try to install it manually with:
-@@ -108,17 +104,17 @@ def run_process(config, cmd):
-     try:
-         proc.wait()
-     except KeyboardInterrupt:
-         proc.kill()
- 
- 
- def gen_yamllint_args(cmdargs, paths=None, conf_file=None):
-     args = cmdargs[:]
--    if isinstance(paths, string_types):
-+    if isinstance(paths, str):
-         paths = [paths]
-     if conf_file and conf_file != 'default':
-         return args + ['-c', conf_file] + paths
-     return args + paths
- 
- 
- def lint(files, config, **lintargs):
-     log = lintargs['log']

+ 35 - 0
mozilla-release/patches/1580280-8-71a1.patch

@@ -0,0 +1,35 @@
+# HG changeset patch
+# User Andrew Halberstadt <ahalberstadt@mozilla.com>
+# Date 1569872531 0
+# Node ID b1aec2f851944151cc2bb458c5a108ca41773fed
+# Parent  3282de8d3e5190213b65f32c0a9349fea2bdce7c
+Bug 1580280 - [configure] Define '__bool__' on PositiveOptionValue for Python 3 compatibility, r=nalexander
+
+Differential Revision: https://phabricator.services.mozilla.com/D47609
+
+diff --git a/python/mozbuild/mozbuild/configure/options.py b/python/mozbuild/mozbuild/configure/options.py
+--- a/python/mozbuild/mozbuild/configure/options.py
++++ b/python/mozbuild/mozbuild/configure/options.py
+@@ -102,17 +102,20 @@ class OptionValue(tuple):
+ 
+ 
+ class PositiveOptionValue(OptionValue):
+     '''Represents the value for a positive option (--enable/--with/--foo)
+     in the form of a tuple for when values are given to the option (in the form
+     --option=value[,value2...].
+     '''
+ 
+-    def __nonzero__(self):
++    def __nonzero__(self):  # py2
++        return True
++
++    def __bool__(self):  # py3
+         return True
+ 
+ 
+ class NegativeOptionValue(OptionValue):
+     '''Represents the value for a negative option (--disable/--without)
+ 
+     This is effectively an empty tuple with a `origin` attribute.
+     '''
+

+ 1117 - 24
mozilla-release/patches/1580280-9-71a1.patch

@@ -1,35 +1,1128 @@
 # HG changeset patch
 # User Andrew Halberstadt <ahalberstadt@mozilla.com>
-# Date 1569872531 0
-# Node ID b1aec2f851944151cc2bb458c5a108ca41773fed
-# Parent  3282de8d3e5190213b65f32c0a9349fea2bdce7c
-Bug 1580280 - [configure] Define '__bool__' on PositiveOptionValue for Python 3 compatibility, r=nalexander
+# Date 1569856181 0
+# Node ID fbc81f84273941e9f7b3ccbcbb5bfe9201d2f6af
+# Parent  32d0532726fd2adae64f484d026375f8a27a36eb
+Bug 1580280 - [mozlint] Run |mach lint| with Python 3 and drop support for Python 2 r=mars
 
-Differential Revision: https://phabricator.services.mozilla.com/D47609
+Differential Revision: https://phabricator.services.mozilla.com/D45441
 
-diff --git a/python/mozbuild/mozbuild/configure/options.py b/python/mozbuild/mozbuild/configure/options.py
---- a/python/mozbuild/mozbuild/configure/options.py
-+++ b/python/mozbuild/mozbuild/configure/options.py
-@@ -102,17 +102,20 @@ class OptionValue(tuple):
+diff --git a/mach b/mach
+--- a/mach
++++ b/mach
+@@ -32,17 +32,16 @@ py2commands="
+     cppunittest
+     cramtest
+     crashtest
+     devtools-css-db
+     doc
+     doctor
+     empty-makefiles
+     environment
+-    eslint
+     file-info
+     firefox-ui-functional
+     fluent-migration-test
+     geckodriver
+     geckodriver-test
+     geckoview-junit
+     gradle
+     gtest
+@@ -50,17 +49,16 @@ py2commands="
+     import-pr
+     install
+     install-android
+     install-desktop
+     jsapi-tests
+     jsshell-bench
+     jstestbrowser
+     jstests
+-    lint
+     marionette-test
+     mochitest
+     mozbuild-reference
+     mozharness
+     mozregression
+     package
+     package-multi-locale
+     pastebin
+diff --git a/python/mozlint/mozlint/__init__.py b/python/mozlint/mozlint/__init__.py
+--- a/python/mozlint/mozlint/__init__.py
++++ b/python/mozlint/mozlint/__init__.py
+@@ -1,9 +1,7 @@
+ # 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/.
+ # flake8: noqa
  
+-from __future__ import absolute_import
+-
+ from .roller import LintRoller
+ from .result import Issue
+diff --git a/python/mozlint/mozlint/cli.py b/python/mozlint/mozlint/cli.py
+--- a/python/mozlint/mozlint/cli.py
++++ b/python/mozlint/mozlint/cli.py
+@@ -1,14 +1,12 @@
+ # 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/.
  
- class PositiveOptionValue(OptionValue):
-     '''Represents the value for a positive option (--enable/--with/--foo)
-     in the form of a tuple for when values are given to the option (in the form
-     --option=value[,value2...].
-     '''
+-from __future__ import absolute_import, print_function, unicode_literals
+-
+ import os
+ import sys
+ from argparse import REMAINDER, ArgumentParser
  
--    def __nonzero__(self):
-+    def __nonzero__(self):  # py2
-+        return True
+ from mozlint.formatters import all_formatters
+ 
+ SEARCH_PATHS = []
+ 
+@@ -214,21 +212,16 @@ def run(paths, linters, formats, outgoin
+     if edit and result.issues:
+         edit_issues(result)
+         result = lint.roll(result.issues.keys())
+ 
+     for formatter_name, path in formats:
+         formatter = formatters.get(formatter_name)
+ 
+         out = formatter(result)
+-        if sys.version_info[0] == 2:
+-            # Encode output with 'replace' to avoid UnicodeEncodeErrors on
+-            # environments that aren't using utf-8.
+-            out = formatter(result).encode(sys.stdout.encoding or 'ascii', 'replace')
+-
+         if out:
+             output_file = open(path, 'w') if path else sys.stdout
+             print(out, file=output_file)
+ 
+     return result.returncode
+ 
+ 
+ if __name__ == '__main__':
+diff --git a/python/mozlint/mozlint/editor.py b/python/mozlint/mozlint/editor.py
+--- a/python/mozlint/mozlint/editor.py
++++ b/python/mozlint/mozlint/editor.py
+@@ -1,14 +1,12 @@
+ # 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, print_function
+-
+ import os
+ import subprocess
+ import tempfile
+ 
+ from mozlint import formatters
+ 
+ 
+ def get_editor():
+diff --git a/python/mozlint/mozlint/errors.py b/python/mozlint/mozlint/errors.py
+--- a/python/mozlint/mozlint/errors.py
++++ b/python/mozlint/mozlint/errors.py
+@@ -1,14 +1,12 @@
+ # 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
+-
+ 
+ class LintException(Exception):
+     pass
+ 
+ 
+ class LinterNotFound(LintException):
+     def __init__(self, path):
+         LintException.__init__(self, "Could not find lint file '{}'".format(path))
+diff --git a/python/mozlint/mozlint/formatters/__init__.py b/python/mozlint/mozlint/formatters/__init__.py
+--- a/python/mozlint/mozlint/formatters/__init__.py
++++ b/python/mozlint/mozlint/formatters/__init__.py
+@@ -1,14 +1,12 @@
+ # 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
+ 
+ from ..result import IssueEncoder
+ from .compact import CompactFormatter
+ from .stylish import StylishFormatter
+ from .summary import SummaryFormatter
+ from .treeherder import TreeherderFormatter
+ from .unix import UnixFormatter
+diff --git a/python/mozlint/mozlint/formatters/compact.py b/python/mozlint/mozlint/formatters/compact.py
+--- a/python/mozlint/mozlint/formatters/compact.py
++++ b/python/mozlint/mozlint/formatters/compact.py
+@@ -1,14 +1,12 @@
+ # 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 ..result import Issue
+ 
+ 
+ class CompactFormatter(object):
+     """Formatter for compact output.
+ 
+     This formatter prints one error per line, mimicking the
+     eslint 'compact' formatter.
+diff --git a/python/mozlint/mozlint/formatters/stylish.py b/python/mozlint/mozlint/formatters/stylish.py
+--- a/python/mozlint/mozlint/formatters/stylish.py
++++ b/python/mozlint/mozlint/formatters/stylish.py
+@@ -1,14 +1,12 @@
+ # 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 mozterm import Terminal
+ 
+ from ..result import Issue
+ from ..util.string import pluralize
+ 
+ 
+ class StylishFormatter(object):
+     """Formatter based on the eslint default."""
+diff --git a/python/mozlint/mozlint/formatters/summary.py b/python/mozlint/mozlint/formatters/summary.py
+--- a/python/mozlint/mozlint/formatters/summary.py
++++ b/python/mozlint/mozlint/formatters/summary.py
+@@ -1,14 +1,12 @@
+ # 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
+-
+ import os
+ from collections import defaultdict
+ 
+ import mozpack.path as mozpath
+ 
+ from ..util.string import pluralize
+ 
+ 
+diff --git a/python/mozlint/mozlint/formatters/treeherder.py b/python/mozlint/mozlint/formatters/treeherder.py
+--- a/python/mozlint/mozlint/formatters/treeherder.py
++++ b/python/mozlint/mozlint/formatters/treeherder.py
+@@ -1,14 +1,12 @@
+ # 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 ..result import Issue
+ 
+ 
+ class TreeherderFormatter(object):
+     """Formatter for treeherder friendly output.
+ 
+     This formatter looks ugly, but prints output such that
+     treeherder is able to highlight the errors and warnings.
+diff --git a/python/mozlint/mozlint/formatters/unix.py b/python/mozlint/mozlint/formatters/unix.py
+--- a/python/mozlint/mozlint/formatters/unix.py
++++ b/python/mozlint/mozlint/formatters/unix.py
+@@ -1,14 +1,12 @@
+ # 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
+-
+ import os
+ 
+ from ..result import Issue
+ 
+ 
+ class UnixFormatter(object):
+     """Formatter that respects Unix output conventions frequently
+     employed by preprocessors and compilers.  The format is
+diff --git a/python/mozlint/mozlint/pathutils.py b/python/mozlint/mozlint/pathutils.py
+--- a/python/mozlint/mozlint/pathutils.py
++++ b/python/mozlint/mozlint/pathutils.py
+@@ -1,14 +1,12 @@
+ # 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 unicode_literals, absolute_import
+-
+ import os
+ 
+ from mozpack import path as mozpath
+ from mozpack.files import FileFinder
+ 
+ 
+ class FilterPath(object):
+     """Helper class to make comparing and matching file paths easier."""
+diff --git a/python/mozlint/mozlint/result.py b/python/mozlint/mozlint/result.py
+--- a/python/mozlint/mozlint/result.py
++++ b/python/mozlint/mozlint/result.py
+@@ -1,14 +1,12 @@
+ # 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 collections import defaultdict
+ from json import dumps, JSONEncoder
+ import os
+ 
+ 
+ class ResultSummary(object):
+     """Represents overall result state from an entire lint run."""
+     root = None
+diff --git a/python/mozlint/mozlint/roller.py b/python/mozlint/mozlint/roller.py
+--- a/python/mozlint/mozlint/roller.py
++++ b/python/mozlint/mozlint/roller.py
+@@ -1,32 +1,28 @@
+ # 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 atexit
+ import copy
+ import logging
+ import os
+ import signal
+ import sys
+ import time
+ import traceback
+ from concurrent.futures import ProcessPoolExecutor
++from concurrent.futures.process import _python_exit as futures_atexit
+ from itertools import chain
+ from math import ceil
+-from multiprocessing import cpu_count
++from multiprocessing import cpu_count, get_context
+ from multiprocessing.queues import Queue
+ from subprocess import CalledProcessError
+ 
+-try:
+-    from multiprocessing import get_context
+-except ImportError:
+-    get_context = None
+-
+ import mozpack.path as mozpath
+ from mozversioncontrol import get_repository_object, MissingUpstreamRepo, InvalidRepoPath
+ 
+ from .errors import LintersNotConfigured
+ from .parser import Parser
+ from .pathutils import findobject
+ from .result import ResultSummary
+ from .types import supported_types
+@@ -84,18 +80,17 @@ def _run_worker(config, paths, **lintarg
+ class InterruptableQueue(Queue):
+     """A multiprocessing.Queue that catches KeyboardInterrupt when a worker is
+     blocking on it and returns None.
+ 
+     This is needed to gracefully handle KeyboardInterrupts when a worker is
+     blocking on ProcessPoolExecutor's call queue.
+     """
+     def __init__(self, *args, **kwargs):
+-        if get_context:
+-            kwargs['ctx'] = get_context()
++        kwargs['ctx'] = get_context()
+         super(InterruptableQueue, self).__init__(*args, **kwargs)
+ 
+     def get(self, *args, **kwargs):
+         try:
+             return Queue.get(self, *args, **kwargs)
+         except KeyboardInterrupt:
+             return None
+ 
+@@ -106,16 +101,34 @@ def _worker_sigint_handler(signum, frame
+     Tells workers not to process the extra jobs on the call queue that couldn't
+     be canceled by the parent process.
+     """
+     global SHUTDOWN
+     SHUTDOWN = True
+     orig_sigint(signum, frame)
+ 
+ 
++def wrap_futures_atexit():
++    """Sometimes futures' atexit handler can spew tracebacks. This wrapper
++    suppresses them."""
++    try:
++        futures_atexit()
++    except Exception:
++        # Generally `atexit` handlers aren't supposed to raise exceptions, but the
++        # futures' handler can sometimes raise when the user presses `CTRL-C`. We
++        # suppress all possible exceptions here so users have a nice experience
++        # when canceling their lint run. Any exceptions raised by this function
++        # won't be useful anyway.
++        pass
++
 +
-+    def __bool__(self):  # py3
-         return True
++atexit.unregister(futures_atexit)
++atexit.register(wrap_futures_atexit)
++
++
+ class LintRoller(object):
+     """Registers and runs linters.
  
+     :param root: Path to which relative paths will be joined. If
+                  unspecified, root will either be determined from
+                  version control or cwd.
+     :param lintargs: Arguments to pass to the underlying linter(s).
+     """
+diff --git a/python/mozlint/mozlint/types.py b/python/mozlint/mozlint/types.py
+--- a/python/mozlint/mozlint/types.py
++++ b/python/mozlint/mozlint/types.py
+@@ -1,23 +1,20 @@
+ # 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/.
  
- class NegativeOptionValue(OptionValue):
-     '''Represents the value for a negative option (--disable/--without)
+-from __future__ import absolute_import, unicode_literals
+-
+ import os
+ import re
+ import sys
+ from abc import ABCMeta, abstractmethod
  
-     This is effectively an empty tuple with a `origin` attribute.
-     '''
-
+ from mozlog import get_default_logger, commandline, structuredlog
+ from mozlog.reader import LogHandler
+ from mozpack.files import FileFinder
+-from six import PY2
+ 
+ from . import result
+ from .pathutils import expand_exclusions, filterpaths, findobject
+ 
+ 
+ class BaseType(object):
+     """Abstract base class for all types of linters."""
+     __metaclass__ = ABCMeta
+@@ -99,18 +96,17 @@ class LineType(BaseType):
+                 errors.extend(self._lint(os.path.join(path, p), config, **lintargs))
+         return errors
+ 
+     def _lint(self, path, config, **lintargs):
+         if os.path.isdir(path):
+             return self._lint_dir(path, config, **lintargs)
+ 
+         payload = config['payload']
+-        kwargs = {} if PY2 else {'errors': 'replace'}
+-        with open(path, 'r', **kwargs) as fh:
++        with open(path, 'r', errors='replace') as fh:
+             lines = fh.readlines()
+ 
+         errors = []
+         for i, line in enumerate(lines):
+             if self.condition(payload, line):
+                 errors.append(result.from_config(config, path=path, lineno=i+1))
+ 
+         return errors
+diff --git a/python/mozlint/mozlint/util/pip.py b/python/mozlint/mozlint/util/pip.py
+--- a/python/mozlint/mozlint/util/pip.py
++++ b/python/mozlint/mozlint/util/pip.py
+@@ -1,15 +1,12 @@
+ # 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
+-from __future__ import absolute_import
+-
+ import subprocess
+ 
+ 
+ def _run_pip(*args):
+     """
+     Helper function that runs pip with subprocess
+     """
+     try:
+diff --git a/python/mozlint/mozlint/util/string.py b/python/mozlint/mozlint/util/string.py
+--- a/python/mozlint/mozlint/util/string.py
++++ b/python/mozlint/mozlint/util/string.py
+@@ -1,11 +1,9 @@
+ # 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
+-
+ 
+ def pluralize(s, num):
+     if num != 1:
+         s += 's'
+     return str(num) + ' ' + s
+diff --git a/python/mozlint/setup.py b/python/mozlint/setup.py
+--- a/python/mozlint/setup.py
++++ b/python/mozlint/setup.py
+@@ -1,14 +1,12 @@
+ # 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 setuptools import setup
+ 
+ VERSION = 0.1
+ DEPS = ["mozlog>=3.4"]
+ 
+ setup(
+     name='mozlint',
+     description='Framework for registering and running micro lints',
+diff --git a/python/mozlint/test/conftest.py b/python/mozlint/test/conftest.py
+--- a/python/mozlint/test/conftest.py
++++ b/python/mozlint/test/conftest.py
+@@ -1,14 +1,12 @@
+ # 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 sys
+ from argparse import Namespace
+ 
+ import pytest
+ 
+ from mozlint import LintRoller
+ 
+diff --git a/python/mozlint/test/linters/external.py b/python/mozlint/test/linters/external.py
+--- a/python/mozlint/test/linters/external.py
++++ b/python/mozlint/test/linters/external.py
+@@ -1,14 +1,12 @@
+ # 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 time
+ 
+ from mozlint import result
+ from mozlint.errors import LintException
+ 
+ 
+ def badreturncode(files, config, **lintargs):
+diff --git a/python/mozlint/test/linters/global_payload.py b/python/mozlint/test/linters/global_payload.py
+--- a/python/mozlint/test/linters/global_payload.py
++++ b/python/mozlint/test/linters/global_payload.py
+@@ -1,14 +1,12 @@
+ # 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
+-
+ from mozlint import result
+ from mozpack.files import FileFinder
+ import mozpack.path as mozpath
+ 
+ from external import external
+ 
+ 
+ def global_payload(config, **lintargs):
+diff --git a/python/mozlint/test/python.ini b/python/mozlint/test/python.ini
+--- a/python/mozlint/test/python.ini
++++ b/python/mozlint/test/python.ini
+@@ -1,10 +1,11 @@
+ [DEFAULT]
+ subsuite = mozlint, os == "linux"
++skip-if = python == 2
+ 
+ [test_cli.py]
+ [test_editor.py]
+ [test_formatters.py]
+ [test_parser.py]
+ [test_pathutils.py]
+ [test_result.py]
+ [test_roller.py]
+diff --git a/python/mozlint/test/runcli.py b/python/mozlint/test/runcli.py
+--- a/python/mozlint/test/runcli.py
++++ b/python/mozlint/test/runcli.py
+@@ -1,20 +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/.
+ 
+-from __future__ import absolute_import
+-
+ import os
+ import sys
+ 
++from mozlint import cli
++
+ here = os.path.abspath(os.path.dirname(__file__))
+-sys.path.insert(0, os.path.join(os.path.dirname(here), 'mozlint'))
+-
+-from mozlint import cli
+ cli.SEARCH_PATHS.append(os.path.join(here, 'linters'))
+ 
+ if __name__ == '__main__':
+     parser = cli.MozlintParser()
+     args = vars(parser.parse_args(sys.argv[1:]))
+     args['root'] = here
+     sys.exit(cli.run(**args))
+diff --git a/python/mozlint/test/test_cli.py b/python/mozlint/test/test_cli.py
+--- a/python/mozlint/test/test_cli.py
++++ b/python/mozlint/test/test_cli.py
+@@ -1,14 +1,12 @@
+ # 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 distutils.spawn import find_executable
+ 
+ import mozunit
+ import pytest
+ 
+ from mozlint import cli
+ 
+diff --git a/python/mozlint/test/test_editor.py b/python/mozlint/test/test_editor.py
+--- a/python/mozlint/test/test_editor.py
++++ b/python/mozlint/test/test_editor.py
+@@ -1,14 +1,12 @@
+ # 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 subprocess
+ 
+ import mozunit
+ import pytest
+ 
+ from mozlint import editor
+ from mozlint.result import ResultSummary, Issue
+diff --git a/python/mozlint/test/test_formatters.py b/python/mozlint/test/test_formatters.py
+--- a/python/mozlint/test/test_formatters.py
++++ b/python/mozlint/test/test_formatters.py
+@@ -1,14 +1,12 @@
+ # 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
+-
+ import json
+ import os
+ 
+ import mozunit
+ import mozpack.path as mozpath
+ import pytest
+ 
+ from mozlint.result import Issue, ResultSummary
+diff --git a/python/mozlint/test/test_parser.py b/python/mozlint/test/test_parser.py
+--- a/python/mozlint/test/test_parser.py
++++ b/python/mozlint/test/test_parser.py
+@@ -1,14 +1,12 @@
+ # 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 mozunit
+ import pytest
+ 
+ from mozlint.parser import Parser
+ from mozlint.errors import (
+     LinterNotFound,
+diff --git a/python/mozlint/test/test_pathutils.py b/python/mozlint/test/test_pathutils.py
+--- a/python/mozlint/test/test_pathutils.py
++++ b/python/mozlint/test/test_pathutils.py
+@@ -1,14 +1,12 @@
+ # 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 fnmatch import fnmatch
+ 
+ import mozunit
+ import pytest
+ 
+ from mozlint import pathutils
+ 
+diff --git a/python/mozlint/test/test_result.py b/python/mozlint/test/test_result.py
+--- a/python/mozlint/test/test_result.py
++++ b/python/mozlint/test/test_result.py
+@@ -1,14 +1,12 @@
+ # 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 mozunit
+ 
+ from mozlint.result import Issue
+ 
+ 
+ def test_issue_defaults():
+     issue = Issue('linter', 'path', 'message', None)
+     assert issue.lineno == 0
+diff --git a/python/mozlint/test/test_roller.py b/python/mozlint/test/test_roller.py
+--- a/python/mozlint/test/test_roller.py
++++ b/python/mozlint/test/test_roller.py
+@@ -1,14 +1,12 @@
+ # 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 platform
+ import signal
+ import subprocess
+ import sys
+ import time
+ 
+ import mozunit
+@@ -221,22 +219,25 @@ def test_max_paths_per_job_global(monkey
+ @pytest.mark.skipif(platform.system() == 'Windows',
+                     reason="signal.CTRL_C_EVENT isn't causing a KeyboardInterrupt on Windows")
+ def test_keyboard_interrupt():
+     # We use two linters so we'll have two jobs. One (string.yml) will complete
+     # quickly. The other (slow.yml) will run slowly.  This way the first worker
+     # will be be stuck blocking on the ProcessPoolExecutor._call_queue when the
+     # signal arrives and the other still be doing work.
+     cmd = [sys.executable, 'runcli.py', '-l=string', '-l=slow']
++    env = os.environ.copy()
++    env['PYTHONPATH'] = os.pathsep.join(sys.path)
+     proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
+-                            cwd=here, universal_newlines=True)
++                            cwd=here, env=env, universal_newlines=True)
+     time.sleep(1)
+     proc.send_signal(signal.SIGINT)
+ 
+     out = proc.communicate()[0]
++    print(out)
+     assert 'warning: not all files were linted' in out
+     assert '2 problems' in out
+     assert 'Traceback' not in out
+ 
+ 
+ def test_support_files(lint, linters, filedir, monkeypatch):
+     jobs = []
+ 
+diff --git a/python/mozlint/test/test_types.py b/python/mozlint/test/test_types.py
+--- a/python/mozlint/test/test_types.py
++++ b/python/mozlint/test/test_types.py
+@@ -1,14 +1,12 @@
+ # 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 mozunit
+ import pytest
+ 
+ from mozlint.result import Issue, ResultSummary
+ 
+ 
+diff --git a/tools/lint/cpp/mingw-capitalization.py b/tools/lint/cpp/mingw-capitalization.py
+--- a/tools/lint/cpp/mingw-capitalization.py
++++ b/tools/lint/cpp/mingw-capitalization.py
+@@ -1,14 +1,12 @@
+ # 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 re
+ 
+ from mozlint.types import LineType
+ 
+ here = os.path.abspath(os.path.dirname(__file__))
+ HEADERS_FILE = os.path.join(here, 'mingw-headers.txt')
+ # generated by cd mingw-w64/mingw-w64-headers &&
+diff --git a/tools/lint/docs/conf.py b/tools/lint/docs/conf.py
+--- a/tools/lint/docs/conf.py
++++ b/tools/lint/docs/conf.py
+@@ -1,18 +1,16 @@
+ # -*- coding: utf-8 -*-
+ #
+ # mozlint documentation build configuration file, created by
+ # sphinx-quickstart on Fri Nov 27 17:38:49 2015.
+ #
+ # This file is execfile()d with the current directory set to its
+ # containing dir.
+ 
+-from __future__ import absolute_import
+-
+ import os
+ 
+ # -- General configuration ------------------------------------------------
+ 
+ # Add any Sphinx extension module names here, as strings. They can be
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+ # ones.
+ extensions = [
+diff --git a/tools/lint/eslint/setup_helper.py b/tools/lint/eslint/setup_helper.py
+--- a/tools/lint/eslint/setup_helper.py
++++ b/tools/lint/eslint/setup_helper.py
+@@ -1,16 +1,14 @@
+ # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+ # vim: set filetype=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, print_function
+-
+ import json
+ import os
+ import platform
+ import re
+ import shutil
+ import subprocess
+ import sys
+ import tempfile
+diff --git a/tools/lint/mach_commands.py b/tools/lint/mach_commands.py
+--- a/tools/lint/mach_commands.py
++++ b/tools/lint/mach_commands.py
+@@ -1,14 +1,12 @@
+ # 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 copy
+ import os
+ 
+ from mozbuild.base import (
+     BuildEnvironmentNotFoundException,
+     MachCommandBase,
+ )
+diff --git a/tools/lint/py2.yml b/tools/lint/py2.yml
+--- a/tools/lint/py2.yml
++++ b/tools/lint/py2.yml
+@@ -28,14 +28,18 @@ py2:
+         - testing/mozharness
+         - testing/tools
+         - testing/web-platform
+         - toolkit
+         - tools/power/mach_commands.py
+         - tools/rb
+         - tools/update-packaging
+         - xpcom
++
++        # These paths are intentionally excluded (Python 3 only)
++        - python/mozlint
++        - tools/lint
+     extensions: ['py']
+     support-files:
+         - 'tools/lint/python/*compat*'
+     type: external
+     payload: python.compat:lintpy2
+     setup: python.compat:setuppy2
+diff --git a/tools/lint/python/check_compat.py b/tools/lint/python/check_compat.py
+--- a/tools/lint/python/check_compat.py
++++ b/tools/lint/python/check_compat.py
+@@ -1,15 +1,13 @@
+ #!/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, print_function
+-
+ import ast
+ import json
+ import sys
+ 
+ 
+ def parse_file(f):
+     with open(f, 'rb') as fh:
+         content = fh.read()
+diff --git a/tools/lint/python/compat.py b/tools/lint/python/compat.py
+--- a/tools/lint/python/compat.py
++++ b/tools/lint/python/compat.py
+@@ -1,14 +1,12 @@
+ # 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 json
+ import os
+ from distutils.spawn import find_executable
+ 
+ import mozfile
+ from mozprocess import ProcessHandlerMixin
+ 
+ from mozlint import result
+diff --git a/tools/lint/python/flake8.py b/tools/lint/python/flake8.py
+--- a/tools/lint/python/flake8.py
++++ b/tools/lint/python/flake8.py
+@@ -1,14 +1,12 @@
+ # 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 json
+ import os
+ import platform
+ import subprocess
+ import sys
+ 
+ import mozfile
+ 
+diff --git a/tools/lint/python/flake8_requirements.txt b/tools/lint/python/flake8_requirements.txt
+--- a/tools/lint/python/flake8_requirements.txt
++++ b/tools/lint/python/flake8_requirements.txt
+@@ -5,32 +5,16 @@ mccabe==0.6.1 \
+     --hash=sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42 \
+     --hash=sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f
+ pyflakes==2.1.0 \
+     --hash=sha256:f277f9ca3e55de669fba45b7393a1449009cff5a37d1af10ebb76c52765269cd \
+     --hash=sha256:5e8c00e30c464c99e0b501dc160b13a14af7f27d4dffb529c556e30a159e231d
+ pycodestyle==2.5.0 \
+     --hash=sha256:95a2219d12372f05704562a14ec30bc76b05a5b297b21a5dfe3f6fac3491ae56 \
+     --hash=sha256:e40a936c9a450ad81df37f549d676d127b1b66000a6c500caa2b085bc0ca976c
+-enum34==1.1.6; python_version < '3.0' \
+-    --hash=sha256:6bd0f6ad48ec2aa117d3d141940d484deccda84d4fcd884f5c3d93c23ecd8c79 \
+-    --hash=sha256:644837f692e5f550741432dd3f223bbb9852018674981b1664e5dc339387588a \
+-    --hash=sha256:8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1 \
+-    --hash=sha256:2d81cbbe0e73112bdfe6ef8576f2238f2ba27dd0d55752a776c41d38b7da2850
+-configparser==3.7.1; python_version < '3.0' \
+-    --hash=sha256:c114ff90ee2e762db972fa205f02491b1f5cf3ff950decd8542c62970c9bedac \
+-    --hash=sha256:df28e045fbff307a28795b18df6ac8662be3219435560ddb068c283afab1ea7a \
+-    --hash=sha256:5bd5fa2a491dc3cfe920a3f2a107510d65eceae10e9c6e547b90261a4710df32
+ setuptools==40.7.1 \
+     --hash=sha256:252520b7969fb4f2fcaf08c014b2891041d56f31180ec0d581297a28597205ff \
+     --hash=sha256:5926bbea397d0fcec2f7946f1691f5820ef0234247b2d5fa83d30cc216d613ec
+ autopep8==1.4.3 \
+     --hash=sha256:33d2b5325b7e1afb4240814fe982eea3a92ebea712869bfd08b3c0393404248c
+ entrypoints==0.3 \
+     --hash=sha256:589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19 \
+     --hash=sha256:c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451
+-typing==3.6.6; python_version < '3.0' \
+-    --hash=sha256:a4c8473ce11a65999c8f59cb093e70686b6c84c98df58c1dae9b3b196089858a \
+-    --hash=sha256:57dcf675a99b74d64dacf6fba08fb17cf7e3d5fdff53d4a30ea2a5e7e52543d4 \
+-    --hash=sha256:4027c5f6127a6267a435201981ba156de91ad0d1d98e9ddc2aa173453453492d
+-functools32==3.2.3-2; python_version < '3.0' \
+-    --hash=sha256:f6253dfbe0538ad2e387bd8fdfd9293c925d63553f5813c4e587745416501e6d \
+-    --hash=sha256:89d824aa6c358c421a234d7f9ee0bd75933a67c29588ce50aaa3acdf4d403fa0
+diff --git a/tools/lint/rust/__init__.py b/tools/lint/rust/__init__.py
+--- a/tools/lint/rust/__init__.py
++++ b/tools/lint/rust/__init__.py
+@@ -1,19 +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/.
+ 
+-from __future__ import absolute_import, print_function
+-from collections import namedtuple
+-
+ import os
+ import signal
+ import re
+ import subprocess
++from collections import namedtuple
+ 
+ from mozfile import which
+ from mozlint import result
+ from mozlint.pathutils import expand_exclusions
+ from mozprocess import ProcessHandler
+ 
+ RUSTFMT_NOT_FOUND = """
+ Could not find rustfmt! Install rustfmt and try again.
+diff --git a/tools/lint/shell/__init__.py b/tools/lint/shell/__init__.py
+--- a/tools/lint/shell/__init__.py
++++ b/tools/lint/shell/__init__.py
+@@ -1,23 +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/.
+ 
+-from __future__ import absolute_import, print_function
+-
+ import os
+ import json
+ import signal
+-
+-# py2-compat
+-try:
+-    from json.decoder import JSONDecodeError
+-except ImportError:
+-    JSONDecodeError = ValueError
++from json.decoder import JSONDecodeError
+ 
+ import mozpack.path as mozpath
+ from mozfile import which
+ from mozlint import result
+ from mozpack.files import FileFinder
+ from mozprocess import ProcessHandlerMixin
+ 
+ 
+diff --git a/tools/lint/spell/__init__.py b/tools/lint/spell/__init__.py
+--- a/tools/lint/spell/__init__.py
++++ b/tools/lint/spell/__init__.py
+@@ -1,29 +1,26 @@
+ # 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 signal
+ import re
+ 
+ # py2-compat
+ try:
+     from json.decoder import JSONDecodeError
+ except ImportError:
+     JSONDecodeError = ValueError
+ 
+ from mozfile import which
+ from mozlint import result
+ from mozlint.util import pip
+ from mozprocess import ProcessHandlerMixin
+-from six import PY3
+ 
+ here = os.path.abspath(os.path.dirname(__file__))
+ CODESPELL_REQUIREMENTS_PATH = os.path.join(here, 'codespell_requirements.txt')
+ 
+ CODESPELL_NOT_FOUND = """
+ Could not find codespell! Install codespell and try again.
+ 
+     $ pip install -U --require-hashes -r {}
+@@ -41,17 +38,17 @@ results = []
+ CODESPELL_FORMAT_REGEX = re.compile(r'(.*):(.*): (.*) ==> (.*)$')
+ 
+ 
+ class CodespellProcess(ProcessHandlerMixin):
+     def __init__(self, config, *args, **kwargs):
+         self.config = config
+         kwargs = {
+             'processOutputLine': [self.process_line],
+-            'universal_newlines': PY3,
++            'universal_newlines': True,
+         }
+         ProcessHandlerMixin.__init__(self, *args, **kwargs)
+ 
+     def process_line(self, line):
+         try:
+             match = CODESPELL_FORMAT_REGEX.match(line)
+             abspath, line, typo, correct = match.groups()
+         except AttributeError:
+diff --git a/tools/lint/test/python.ini b/tools/lint/test/python.ini
+--- a/tools/lint/test/python.ini
++++ b/tools/lint/test/python.ini
+@@ -1,7 +1,8 @@
+ [DEFAULT]
+ subsuite=mozlint, os == "linux"
++skip-if = python == 2
+ 
+ [test_eslint.py]
+ skip-if = os == "win"  # node not installed on worker
+ [test_flake8.py]
+ requirements = tools/lint/python/flake8_requirements.txt
+diff --git a/tools/lint/test/test_eslint.py.1559975.later b/tools/lint/test/test_eslint.py.1559975.later
+deleted file mode 100644
+--- a/tools/lint/test/test_eslint.py.1559975.later
++++ /dev/null
+@@ -1,13 +0,0 @@
+---- test_eslint.py
+-+++ test_eslint.py
+-@@ -1,8 +1,10 @@
+-+from __future__ import absolute_import, print_function
+-+
+- import mozunit
+- 
+- from conftest import build
+- 
+- LINTER = 'eslint'
+- 
+- 
+- def test_lint_with_global_exclude(lint, config, paths):
+diff --git a/tools/lint/test/test_flake8.py b/tools/lint/test/test_flake8.py
+--- a/tools/lint/test/test_flake8.py
++++ b/tools/lint/test/test_flake8.py
+@@ -1,10 +1,8 @@
+-from __future__ import absolute_import, print_function
+-
+ import os
+ 
+ import mozunit
+ 
+ LINTER = 'flake8'
+ 
+ 
+ def test_lint_single_file(lint, paths):
+diff --git a/tools/lint/yamllint_/__init__.py b/tools/lint/yamllint_/__init__.py
+--- a/tools/lint/yamllint_/__init__.py
++++ b/tools/lint/yamllint_/__init__.py
+@@ -1,26 +1,22 @@
+ # 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 re
+ import os
+ import signal
+ import subprocess
+ from collections import defaultdict
+ 
+ from mozfile import which
+ from mozlint import result
+ from mozlint.pathutils import get_ancestors_by_name
+ from mozprocess import ProcessHandlerMixin
+-from six import string_types
+-
+ 
+ here = os.path.abspath(os.path.dirname(__file__))
+ YAMLLINT_REQUIREMENTS_PATH = os.path.join(here, 'yamllint_requirements.txt')
+ 
+ 
+ YAMLLINT_INSTALL_ERROR = """
+ Unable to install correct version of yamllint
+ Try to install it manually with:
+@@ -108,17 +104,17 @@ def run_process(config, cmd):
+     try:
+         proc.wait()
+     except KeyboardInterrupt:
+         proc.kill()
+ 
+ 
+ def gen_yamllint_args(cmdargs, paths=None, conf_file=None):
+     args = cmdargs[:]
+-    if isinstance(paths, string_types):
++    if isinstance(paths, str):
+         paths = [paths]
+     if conf_file and conf_file != 'default':
+         return args + ['-c', conf_file] + paths
+     return args + paths
+ 
+ 
+ def lint(files, config, **lintargs):
+     log = lintargs['log']

+ 5 - 5
mozilla-release/patches/1585734-71a1.patch

@@ -2,7 +2,7 @@
 # User Ed Lee <edilee@mozilla.com>
 # Date 1570211139 0
 # Node ID a96731900f479174f46026696c530088f047af93
-# Parent  fbce4bee4fc441a7ad0cd8aa15859c860fc50b37
+# Parent  afc10cc3c317cf7d13e0fa1486d725b6f488489d
 Bug 1585734 - [lint] Make sure codespell, rst and yaml run with virtualenv python r=ahal
 
 Use mozfile.which to get the correct python for this environment.
@@ -37,7 +37,7 @@ new file mode 100644
 diff --git a/tools/lint/spell/__init__.py b/tools/lint/spell/__init__.py
 --- a/tools/lint/spell/__init__.py
 +++ b/tools/lint/spell/__init__.py
-@@ -107,17 +107,18 @@ def lint(paths, config, fix=None, **lint
+@@ -109,17 +109,18 @@ def lint(paths, config, fix=None, **lint
              return 1
          return []
  
@@ -60,8 +60,8 @@ diff --git a/tools/lint/spell/__init__.py b/tools/lint/spell/__init__.py
 diff --git a/tools/lint/yamllint_/__init__.py b/tools/lint/yamllint_/__init__.py
 --- a/tools/lint/yamllint_/__init__.py
 +++ b/tools/lint/yamllint_/__init__.py
-@@ -122,16 +122,17 @@ def gen_yamllint_args(cmdargs, paths=Non
- def lint(files, config, **lintargs):
+@@ -120,16 +120,17 @@ def lint(files, config, **lintargs):
+     log = lintargs['log']
      if not reinstall_yamllint():
          print(YAMLLINT_INSTALL_ERROR)
          return 1
@@ -73,8 +73,8 @@ diff --git a/tools/lint/yamllint_/__init__.py b/tools/lint/yamllint_/__init__.py
          binary,
          '-f', 'parsable'
      ]
+     log.debug("Command: {}".format(' '.join(cmdargs)))
  
      config = config.copy()
      config['root'] = lintargs['root']
  
-     # Run any paths with a .yamllint file in the directory separately so

+ 8 - 6
mozilla-release/patches/1586358-71a1.patch

@@ -2,7 +2,7 @@
 # User Ricky Stewart <rstewart@mozilla.com>
 # Date 1570482919 0
 # Node ID fb7912816d3e5a8f8f5ec90d6e0f79565b669924
-# Parent  fa0b76ec41164a05f74427937abb7f10af953b63
+# Parent  717ea2319c323615d5983a4db479c87ae725f0eb
 Bug 1586358 - Replace existing instances of GENERATED_FILES with references to the GeneratedFile template r=firefox-build-system-reviewers,mshal
 
 (Same content as bad revision https://phabricator.services.mozilla.com/D48230, but with a very small change to config/external/icu/data/moz.build to fix the build breakage.)
@@ -62,7 +62,7 @@ diff --git a/accessible/xpcom/moz.build b/accessible/xpcom/moz.build
 diff --git a/build/clang-plugin/moz.build b/build/clang-plugin/moz.build
 --- a/build/clang-plugin/moz.build
 +++ b/build/clang-plugin/moz.build
-@@ -45,22 +45,20 @@ HOST_SOURCES += [
+@@ -45,23 +45,21 @@ HOST_SOURCES += [
  if CONFIG['ENABLE_MOZSEARCH_PLUGIN']:
      HOST_SOURCES += [
          'mozsearch-plugin/FileOperations.cpp',
@@ -76,10 +76,12 @@ diff --git a/build/clang-plugin/moz.build b/build/clang-plugin/moz.build
 -third_party_paths.script = "ThirdPartyPaths.py:generate"
 -third_party_paths.inputs = [
 -    '/tools/rewriting/ThirdPartyPaths.txt',
+-    '/tools/rewriting/Generated.txt',
 -]
 +GeneratedFile('ThirdPartyPaths.cpp', script="ThirdPartyPaths.py",
 +              entry_point="generate", inputs=[
 +                  '/tools/rewriting/ThirdPartyPaths.txt',
++                  '/tools/rewriting/Generated.txt',
 +              ])
  
  HOST_COMPILE_FLAGS['STL'] = []
@@ -359,7 +361,7 @@ diff --git a/config/external/icu/data/moz.build b/config/external/icu/data/moz.b
 diff --git a/dom/base/moz.build b/dom/base/moz.build
 --- a/dom/base/moz.build
 +++ b/dom/base/moz.build
-@@ -467,23 +467,16 @@ include('/ipc/chromium/chromium-config.m
+@@ -469,23 +469,16 @@ include('/ipc/chromium/chromium-config.m
  FINAL_LIBRARY = 'xul'
  
  if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
@@ -390,7 +392,7 @@ diff --git a/dom/base/moz.build b/dom/base/moz.build
 diff --git a/dom/bindings/moz.build b/dom/bindings/moz.build
 --- a/dom/bindings/moz.build
 +++ b/dom/bindings/moz.build
-@@ -162,15 +162,15 @@ PYTHON_UNITTEST_MANIFESTS += [
+@@ -161,15 +161,15 @@ PYTHON_UNITTEST_MANIFESTS += [
  if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
      CXXFLAGS += ['-Wno-error=shadow']
      # Suppress warnings in third-party code.
@@ -875,7 +877,7 @@ diff --git a/toolkit/components/telemetry/moz.build b/toolkit/components/telemet
 diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
 --- a/toolkit/library/moz.build
 +++ b/toolkit/library/moz.build
-@@ -322,31 +322,25 @@ if CONFIG['COMPILE_ENVIRONMENT']:
+@@ -318,31 +318,25 @@ if CONFIG['COMPILE_ENVIRONMENT']:
      if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa'):
          full_libname = SHARED_LIBRARY_NAME
      else:
@@ -913,7 +915,7 @@ diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
      if CONFIG['OS_ARCH'] == 'Linux':
          # Create a GDB Python auto-load file alongside the libxul shared library
          # in the build directory.
-@@ -360,16 +354,15 @@ USE_LIBS += ['gkrust']
+@@ -356,16 +350,15 @@ USE_LIBS += ['gkrust']
  # The buildid is refreshed on every (incremental) build. But we want to avoid
  # rebuilding libxul every time, so instead of having a source file that
  # #include's buildid.h, which would have a dependency on it, and that would

+ 0 - 0
mozilla-release/patches/1587715-PARTIAL-71a1.patch → mozilla-release/patches/1587715-PARTIAL-72a1.patch


+ 75 - 76
mozilla-release/patches/series

@@ -5827,108 +5827,107 @@ NOBUG-removenonascii67a1-25314.patch
 1577685-70a1.patch
 1577867-70a1.patch
 1577869-70a1.patch
-1618065-75a1.patch
+1577908-71a1.patch
+1577501-71a1.patch
 1578531-71a1.patch
-1577411-71a1.patch
-1577726-2-fix-71a1.patch
-1579546-71a1.patch
+1577871-71a1.patch
+1578145-71a1.patch
+1578198-71a1.patch
+1577517-71a1.patch
+1578776-71a1.patch
+1578478-71a1.patch
+1577826-1-71a1.patch
+1577826-2-71a1.patch
+1201401-682.patch
+1577726-3-71a1.patch
+1577726-4-71a1.patch
 1577760-71a1.patch
-1550517-71a1.patch
+1579546-71a1.patch
+1577726-5-71a1.patch
+1577726-6-71a1.patch
+1577411-71a1.patch
+1579455-1-71a1.patch
+1496746-71a1.patch
+1579479-71a1.patch
+1567642-1-71a1.patch
+1570772-8-71a1.patch
+1579523-71a1.patch
+1559975-38-71a1.patch
 1579845-4-71a1.patch
-1577799-71a1.patch
+1567642-3-71a1.patch
+1567642-4-71a1.patch
+1575216-71a1.patch
+1550517-71a1.patch
+1580492-71a1.patch
+1580931-71a1.patch
+1559975-39-71a1.patch
+1559975-40-71a1.patch
 1550516-71a1.patch
 1576659-PARTIAL-71a1.patch
+1580280-1-71a1.patch
+1580280-2-71a1.patch
+1580280-3-71a1.patch
+1580280-4-71a1.patch
+1567642-6-71a1.patch
 1581921-71a1.patch
 1582114-71a1.patch
+1579455-2-71a1.patch
+1579455-3-71a1.patch
+1579775-1-71a1.patch
+1579775-2-71a1.patch
+1580280-6-71a1.patch
+1559975-41-71a1.patch
 1527818-PARTIAL-71a1.patch
+1554657-71a1.patch
 1582078-71a1.patch
+1582743-71a1.patch
 1567642-8-71a1.patch
+1398167-71a1.patch
+1577799-71a1.patch
 1581248-71a1.patch
 1539462-1only-webide-71a1.patch
+1580317-71a1.patch
+1583958-71a1.patch
 1583177-71a1.patch
 1579845-6-71a1.patch
+1494090-71a1.patch
+1580280-8-71a1.patch
+1580280-9-71a1.patch
 1585305-71a1.patch
-1576859-71a1.patch
-1550108-1only-71a1.patch
-1580356-3only-PARTIAL-71a1.patch
-1585734-71a1.patch
-1587187-71a1.patch
-1201401-682.patch
-1584907-71a1.patch
-1585358-71a1.patch
-1577871-71a1.patch
-1577908-71a1.patch
-1559975-38-71a1.patch
-1559975-39-71a1.patch
-1559975-40-71a1.patch
-1559975-41-71a1.patch
-1578198-71a1.patch
-1577517-71a1.patch
-1577826-1-71a1.patch
-1577826-2-71a1.patch
-1567642-1-71a1.patch
-1567642-2-71a1.patch
-1567642-3-71a1.patch
-1567642-4-71a1.patch
-1579455-1-71a1.patch
-1579455-2-71a1.patch
-1579455-3-71a1.patch
-1583958-71a1.patch
+1584567-1-71a1.patch
 1580533-71a1.patch
-1494090-71a1.patch
 1562996-71a1.patch
-1433941-71a1.patch
-1586358-71a1.patch
-1584452-71a1.patch
-1587206-1-71a1.patch
-1583582-71a1.patch
-1584468-71a1.patch
-1587913-71a1.patch
-1587715-PARTIAL-71a1.patch
-1580280-3-71a1.patch
-1580280-9-71a1.patch
-1398167-71a1.patch
-1570772-8-71a1.patch
-1577501-71a1.patch
-1580492-71a1.patch
-1580280-1-71a1.patch
-1580280-2-71a1.patch
-1580280-4-71a1.patch
-1580280-6-71a1.patch
-1554657-71a1.patch
-1580280-7-71a1.patch
-1577726-1-71a1.patch
-1577726-2-71a1.patch
-1577726-3-71a1.patch
-1577726-4-71a1.patch
-1585686-71a1.patch
 1585565-1-71a1.patch
 1585565-2-71a1.patch
+1585146-1-71a1.patch
+1585146-2-71a1.patch
+1585672-71a1.patch
+1585686-71a1.patch
 1585702-1-71a1.patch
+1550108-1only-71a1.patch
+1580356-3only-PARTIAL-71a1.patch
+1433941-71a1.patch
 1585702-2-71a1.patch
 1585702-3-71a1.patch
-1584567-1-71a1.patch
 1585828-71a1.patch
-1578348-71a1.patch
-1581015-71a1.patch
 1586010-71a1.patch
-1579775-1-71a1.patch
-1579775-2-71a1.patch
-1578776-71a1.patch
-1578478-71a1.patch
-1579523-71a1.patch
-1580931-71a1.patch
-1582743-71a1.patch
-1579479-71a1.patch
+1585734-71a1.patch
+1584907-71a1.patch
+1584452-71a1.patch
+1586358-71a1.patch
+1578348-71a1.patch
+1576859-71a1.patch
+1587187-71a1.patch
+1585358-71a1.patch
+1587206-1-71a1.patch
+1583582-71a1.patch
 1579758-71a1.patch
-1496746-71a1.patch
-1580317-71a1.patch
+1584468-71a1.patch
+1581015-71a1.patch
+1587913-71a1.patch
 1583360-71a1.patch
-1575216-71a1.patch
-1585146-1-71a1.patch
-1585146-2-71a1.patch
-1585672-71a1.patch
-1578145-71a1.patch
+1587715-PARTIAL-72a1.patch
+1618065-75a1.patch
 1590086-72a1.patch
 1588947-72a1.patch
 1591195-72a1.patch