Bug 1335309 - Change the default for find_executables to False. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 31 Jan 2017 14:06:15 +0900
changeset 380868 e9ba8f265022d9778ffb494988aa8ce9e4d9c004
parent 380867 41b0870f79dce0f6b28f502aabad6b3c210f9971
child 380869 0cbddad8e9dc108074243af832cdf26877590619
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1335309
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1335309 - Change the default for find_executables to False. r=mshal Back when the class was written, for the packaging code, it made sense that the default was True. But now that it's used all over the place, and that the vast majority of uses are with find_executables=False, it makes more sense for that to be the default.
build/windows_toolchain.py
config/tests/test_mozbuild_reading.py
python/mozbuild/mozbuild/action/explode_aar.py
python/mozbuild/mozbuild/action/generate_suggestedsites.py
python/mozbuild/mozbuild/action/package_fennec_apk.py
python/mozbuild/mozbuild/action/process_install_manifest.py
python/mozbuild/mozbuild/action/test_archive.py
python/mozbuild/mozbuild/action/zip.py
python/mozbuild/mozbuild/backend/android_eclipse.py
python/mozbuild/mozbuild/backend/visualstudio.py
python/mozbuild/mozbuild/codecoverage/packager.py
python/mozbuild/mozbuild/frontend/gyp_reader.py
python/mozbuild/mozbuild/frontend/mach_commands.py
python/mozbuild/mozbuild/frontend/reader.py
python/mozbuild/mozbuild/frontend/sandbox.py
python/mozbuild/mozbuild/jar.py
python/mozbuild/mozbuild/test/backend/test_build.py
python/mozbuild/mozpack/files.py
python/mozbuild/mozpack/manifests.py
python/mozbuild/mozpack/packager/unpack.py
python/mozbuild/mozpack/test/test_files.py
python/mozbuild/mozpack/test/test_mozjar.py
python/mozbuild/mozpack/test/test_unify.py
python/mozlint/mozlint/pathutils.py
tools/docs/moztreedocs/__init__.py
--- a/build/windows_toolchain.py
+++ b/build/windows_toolchain.py
@@ -145,26 +145,24 @@ def resolve_files():
     """Resolve the files that constitute a standalone toolchain.
 
     This is a generator of (dest path, file) where the destination
     path is relative and the file instance is a BaseFile from mozpack.
     """
     vs_path, sdk_path = find_vs_paths()
 
     for entry in VS_PATTERNS:
-        finder = FileFinder(vs_path, find_executables=False,
-                            ignore=entry.get('ignore', []))
+        finder = FileFinder(vs_path, ignore=entry.get('ignore', []))
         for p, f in finder.find(entry['pattern']):
             assert p.startswith(('VC/', 'DIA SDK/'))
 
             yield p.encode('utf-8'), f
 
     for entry in SDK_PATTERNS:
-        finder = FileFinder(sdk_path, find_executables=False,
-                            ignore=entry.get('ignore', []))
+        finder = FileFinder(sdk_path, ignore=entry.get('ignore', []))
         for p, f in finder.find(entry['pattern']):
             relpath = 'SDK/%s' % p
 
             yield relpath.encode('utf-8'), f
 
 
 def resolve_files_and_hash(manifest):
     """Resolve files and hash their data.
--- a/config/tests/test_mozbuild_reading.py
+++ b/config/tests/test_mozbuild_reading.py
@@ -84,18 +84,17 @@ class TestMozbuildReading(unittest.TestC
 
         if config.substs['MOZ_BUILD_APP'] == 'js':
             raise unittest.SkipTest('failing in Spidermonkey builds')
 
         reader = BuildReader(config)
         all_paths = self._mozbuilds(reader)
         _, contexts = reader.read_relevant_mozbuilds(all_paths)
 
-        finder = FileFinder(config.topsrcdir, find_executables=False,
-                            ignore=['obj*'])
+        finder = FileFinder(config.topsrcdir, ignore=['obj*'])
 
         def pattern_exists(pat):
             return [p for p in finder.find(pat)] != []
 
         for ctx in contexts:
             if not isinstance(ctx, Files):
                 continue
             relsrcdir = ctx.relsrcdir
--- a/python/mozbuild/mozbuild/action/explode_aar.py
+++ b/python/mozbuild/mozbuild/action/explode_aar.py
@@ -29,17 +29,17 @@ def explode(aar, destdir):
 
     # classes.jar is always present.  However, multiple JAR files with the same
     # name confuses our staged Proguard process in
     # mobile/android/base/Makefile.in, so we make the names unique here.
     classes_jar = mozpath.join(destdir, name + '-classes.jar')
     os.rename(mozpath.join(destdir, 'classes.jar'), classes_jar)
 
     # Embedded JAR libraries are optional.
-    finder = FileFinder(mozpath.join(destdir, 'libs'), find_executables=False)
+    finder = FileFinder(mozpath.join(destdir, 'libs'))
     for p, _ in finder.find('*.jar'):
         jar = mozpath.join(finder.base, name + '-' + p)
         os.rename(mozpath.join(finder.base, p), jar)
 
     # Frequently assets/ is present but empty.  Protect against meaningless
     # changes to the AAR files by deleting empty assets/ directories.
     assets = mozpath.join(destdir, 'assets')
     try:
--- a/python/mozbuild/mozbuild/action/generate_suggestedsites.py
+++ b/python/mozbuild/mozbuild/action/generate_suggestedsites.py
@@ -97,17 +97,17 @@ def main(args):
             sites.append(site)
 
             # Now check for existence of an appropriately named drawable.  If none
             # exists, throw.  This stops a locale discovering, at runtime, that the
             # corresponding drawable was not added to en-US.
             if not opts.resources:
                 continue
             resources = os.path.abspath(opts.resources)
-            finder = FileFinder(resources, find_executables=False)
+            finder = FileFinder(resources)
             matches = [p for p, _ in finder.find(drawables_template.format(name=name))]
             if not matches:
                 raise Exception("Could not find drawable in '{resources}' for '{name}'"
                     .format(resources=resources, name=name))
             else:
                 if opts.verbose:
                     print("Found {len} drawables in '{resources}' for '{name}': {matches}"
                           .format(len=len(matches), resources=resources, name=name, matches=matches))
--- a/python/mozbuild/mozbuild/action/package_fennec_apk.py
+++ b/python/mozbuild/mozbuild/action/package_fennec_apk.py
@@ -49,22 +49,22 @@ def package_fennec_apk(inputs=[], omni_j
         if not os.path.exists(abspath):
             raise ValueError('File %s not found (looked for %s)' % \
                              (file.path, abspath))
         if jarrer.contains(path):
             jarrer.remove(path)
         jarrer.add(path, file, compress=compress)
 
     for features_dir in features_dirs:
-        finder = FileFinder(features_dir, find_executables=False)
+        finder = FileFinder(features_dir)
         for p, f in finder.find('**'):
             add(mozpath.join('assets', 'features', p), f, False)
 
     for assets_dir in assets_dirs:
-        finder = FileFinder(assets_dir, find_executables=False)
+        finder = FileFinder(assets_dir)
         for p, f in finder.find('**'):
             compress = None  # Take default from Jarrer.
             if p.endswith('.so'):
                 # Asset libraries are special.
                 if f.open().read(5)[1:] == '7zXZ':
                     print('%s is already compressed' % p)
                     # We need to store (rather than deflate) compressed libraries
                     # (even if we don't compress them ourselves).
@@ -86,17 +86,17 @@ def package_fennec_apk(inputs=[], omni_j
                     print('xz-compressing %s with %s' % (p, ' '.join(cmd)))
                     subprocess.check_output(cmd)
                     os.rename(f.path + '.xz', f.path)
                     compress = False
 
             add(mozpath.join('assets', p), f, compress=compress)
 
     for lib_dir in lib_dirs:
-        finder = FileFinder(lib_dir, find_executables=False)
+        finder = FileFinder(lib_dir)
         for p, f in finder.find('**'):
             add(mozpath.join('lib', p), f)
 
     for root_file in root_files:
         add(os.path.basename(root_file), File(root_file))
 
     if omni_ja:
         add(mozpath.join('assets', 'omni.ja'), File(omni_ja), compress=False)
--- a/python/mozbuild/mozbuild/action/process_install_manifest.py
+++ b/python/mozbuild/mozbuild/action/process_install_manifest.py
@@ -39,18 +39,17 @@ def process_manifest(destdir, paths, tra
     if track:
         if os.path.exists(track):
             # We use the same format as install manifests for the tracking
             # data.
             manifest = InstallManifest(path=track)
             remove_unaccounted = FileRegistry()
             dummy_file = BaseFile()
 
-            finder = FileFinder(destdir, find_executables=False,
-                                find_dotfiles=True)
+            finder = FileFinder(destdir, find_dotfiles=True)
             for dest in manifest._dests:
                 for p, f in finder.find(dest):
                     remove_unaccounted.add(p, dummy_file)
 
         else:
             # If tracking is enabled and there is no file, we don't want to
             # be removing anything.
             remove_unaccounted=False
--- a/python/mozbuild/mozbuild/action/test_archive.py
+++ b/python/mozbuild/mozbuild/action/test_archive.py
@@ -465,17 +465,16 @@ def find_files(archive):
         ignore = list(entry.get('ignore', []))
         ignore.extend([
             '**/.flake8',
             '**/.mkdir.done',
             '**/*.pyc',
         ])
 
         common_kwargs = {
-            'find_executables': False,
             'find_dotfiles': True,
             'ignore': ignore,
         }
 
         finder = FileFinder(os.path.join(source, base), **common_kwargs)
 
         for pattern in patterns:
             for p, f in finder.find(pattern):
--- a/python/mozbuild/mozbuild/action/zip.py
+++ b/python/mozbuild/mozbuild/action/zip.py
@@ -23,17 +23,17 @@ def main(args):
     parser.add_argument("zip", help="Path to zip file to write")
     parser.add_argument("input", nargs="+",
                         help="Path to files to add to zip")
     args = parser.parse_args(args)
 
     jarrer = Jarrer(optimize=False)
 
     with errors.accumulate():
-        finder = FileFinder(args.C, find_executables=False)
+        finder = FileFinder(args.C)
         for path in args.input:
             for p, f in finder.find(path):
                 jarrer.add(p, f)
         jarrer.copy(mozpath.join(args.C, args.zip))
 
 
 if __name__ == '__main__':
     main(sys.argv[1:])
--- a/python/mozbuild/mozbuild/backend/android_eclipse.py
+++ b/python/mozbuild/mozbuild/backend/android_eclipse.py
@@ -242,17 +242,17 @@ class AndroidEclipseBackend(CommonBacken
             filteredResources = self._Element_for_filtered_resources(data.filtered_resources)
             defines['IDE_PROJECT_FILTERED_RESOURCES'] = pretty_print(filteredResources).strip()
         else:
             defines['IDE_PROJECT_FILTERED_RESOURCES'] = ''
         defines['ANDROID_TARGET_SDK'] = self.environment.substs['ANDROID_TARGET_SDK']
         defines['MOZ_ANDROID_MIN_SDK_VERSION'] = self.environment.defines['MOZ_ANDROID_MIN_SDK_VERSION']
 
         copier = FileCopier()
-        finder = FileFinder(template_directory, find_executables=False)
+        finder = FileFinder(template_directory)
         for input_filename, f in itertools.chain(finder.find('**'), finder.find('.**')):
             if input_filename == 'AndroidManifest.xml' and not data.is_library:
                 # Main projects supply their own manifests.
                 continue
             copier.add(input_filename, PreprocessedFile(
                 mozpath.join(finder.base, input_filename),
                 depfile_path=None,
                 marker='#',
--- a/python/mozbuild/mozbuild/backend/visualstudio.py
+++ b/python/mozbuild/mozbuild/backend/visualstudio.py
@@ -185,18 +185,17 @@ class VisualStudioBackend(CommonBackend)
     def _write_projects_for_sources(self, sources, prefix, out_dir):
         projects = {}
         for item, path in sorted(sources.items()):
             config = self._paths_to_configs.get(path, None)
             sources = self._paths_to_sources.get(path, set())
             sources = set(os.path.join('$(TopSrcDir)', path, s) for s in sources)
             sources = set(os.path.normpath(s) for s in sources)
 
-            finder = FileFinder(os.path.join(self.environment.topsrcdir, path),
-                find_executables=False)
+            finder = FileFinder(os.path.join(self.environment.topsrcdir, path))
 
             headers = [t[0] for t in finder.find('*.h')]
             headers = [os.path.normpath(os.path.join('$(TopSrcDir)',
                 path, f)) for f in headers]
 
             includes = [
                 os.path.join('$(TopSrcDir)', path),
                 os.path.join('$(TopObjDir)', path),
--- a/python/mozbuild/mozbuild/codecoverage/packager.py
+++ b/python/mozbuild/mozbuild/codecoverage/packager.py
@@ -10,17 +10,17 @@ import sys
 from mozpack.files import FileFinder
 from mozpack.copier import Jarrer
 
 def package_gcno_tree(root, output_file):
     # XXX JarWriter doesn't support unicode strings, see bug 1056859
     if isinstance(root, unicode):
         root = root.encode('utf-8')
 
-    finder = FileFinder(root, find_executables=False)
+    finder = FileFinder(root)
     jarrer = Jarrer(optimize=False)
     for p, f in finder.find("**/*.gcno"):
         jarrer.add(p, f)
     jarrer.copy(output_file)
 
 
 def cli(args=sys.argv[1:]):
     parser = argparse.ArgumentParser()
--- a/python/mozbuild/mozbuild/frontend/gyp_reader.py
+++ b/python/mozbuild/mozbuild/frontend/gyp_reader.py
@@ -375,17 +375,17 @@ class GypProcessor(object):
 
         if gyp_dir_attrs.no_chromium:
             includes = []
             depth = mozpath.dirname(path)
         else:
             depth = chrome_src
             # Files that gyp_chromium always includes
             includes = [encode(mozpath.join(script_dir, 'common.gypi'))]
-            finder = FileFinder(chrome_src, find_executables=False)
+            finder = FileFinder(chrome_src)
             includes.extend(encode(mozpath.join(chrome_src, name))
                             for name, _ in finder.find('*/supplement.gypi'))
 
         str_vars = dict((name, encode(value)) for name, value in
                         gyp_dir_attrs.variables.items())
         self._gyp_loader_future = executor.submit(load_gyp, [path], b'mozbuild',
                                                   str_vars, includes,
                                                   encode(depth), params)
--- a/python/mozbuild/mozbuild/frontend/mach_commands.py
+++ b/python/mozbuild/mozbuild/frontend/mach_commands.py
@@ -187,17 +187,17 @@ class MozbuildFileCommands(MachCommandBa
             if not os.path.exists(hg_path):
                 raise InvalidPathException('a Mercurial repo is required '
                         'when specifying a revision')
 
             repo = self.topsrcdir
 
         # We need two finders because the reader's finder operates on
         # absolute paths.
-        finder = FileFinder(self.topsrcdir, find_executables=False)
+        finder = FileFinder(self.topsrcdir)
         if repo:
             reader_finder = MercurialRevisionFinder(repo, rev=rev,
                                                     recognize_repo_paths=True)
         else:
             reader_finder = default_finder
 
         # Expand wildcards.
         allpaths = []
--- a/python/mozbuild/mozbuild/frontend/reader.py
+++ b/python/mozbuild/mozbuild/frontend/reader.py
@@ -937,18 +937,17 @@ class BuildReader(object):
         ignore = {
             # Ignore fake moz.build files used for testing moz.build.
             'python/mozbuild/mozbuild/test',
 
             # Ignore object directories.
             'obj*',
         }
 
-        finder = FileFinder(self.config.topsrcdir, find_executables=False,
-            ignore=ignore)
+        finder = FileFinder(self.config.topsrcdir, ignore=ignore)
 
         # The root doesn't get picked up by FileFinder.
         yield 'moz.build'
 
         for path, f in finder.find('**/moz.build'):
             yield path
 
     def find_sphinx_variables(self):
--- a/python/mozbuild/mozbuild/frontend/sandbox.py
+++ b/python/mozbuild/mozbuild/frontend/sandbox.py
@@ -26,17 +26,17 @@ import weakref
 from mozbuild.util import (
     exec_,
     ReadOnlyDict,
 )
 from .context import Context
 from mozpack.files import FileFinder
 
 
-default_finder = FileFinder('/', find_executables=False)
+default_finder = FileFinder('/')
 
 
 def alphabetical_sorted(iterable, cmp=None, key=lambda x: x.lower(),
                         reverse=False):
     """sorted() replacement for the sandbox, ordering alphabetically by
     default.
     """
     return sorted(iterable, cmp, key, reverse)
--- a/python/mozbuild/mozbuild/jar.py
+++ b/python/mozbuild/mozbuild/jar.py
@@ -413,17 +413,17 @@ class JarMaker(object):
         if '*' in src:
             def _prefix(s):
                 for p in s.split('/'):
                     if '*' not in p:
                         yield p + '/'
             prefix = ''.join(_prefix(src))
             emitted = set()
             for _srcdir in src_base:
-                finder = FileFinder(_srcdir, find_executables=False)
+                finder = FileFinder(_srcdir)
                 for path, _ in finder.find(src):
                     # If the path was already seen in one of the other source
                     # directories, skip it. That matches the non-wildcard case
                     # below, where we pick the first existing file.
                     reduced_path = path[len(prefix):]
                     if reduced_path in emitted:
                         continue
                     emitted.add(reduced_path)
--- a/python/mozbuild/mozbuild/test/backend/test_build.py
+++ b/python/mozbuild/mozbuild/test/backend/test_build.py
@@ -147,17 +147,17 @@ class TestBuild(unittest.TestCase):
         test_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                  'data', 'build') + os.sep
 
         # We want unicode instances out of the files, because having plain str
         # makes assertEqual diff output in case of error extra verbose because
         # of the difference in type.
         result = {
             p: f.open().read().decode('utf-8')
-            for p, f in FileFinder(mozpath.join(config.topobjdir, 'dist'), find_executables=False)
+            for p, f in FileFinder(mozpath.join(config.topobjdir, 'dist'))
         }
         self.assertTrue(len(result))
         self.assertEqual(result, {
             'bin/baz.ini': 'baz.ini: FOO is foo\n',
             'bin/child/bar.ini': 'bar.ini\n',
             'bin/child2/foo.css': 'foo.css: FOO is foo\n',
             'bin/child2/qux.ini': 'qux.ini: BAR is not defined\n',
             'bin/chrome.manifest':
--- a/python/mozbuild/mozpack/files.py
+++ b/python/mozbuild/mozpack/files.py
@@ -836,33 +836,31 @@ class BaseFinder(object):
                 if mozpath.basedir(p, [pattern]) == pattern:
                     yield p, file_getter(p)
 
 
 class FileFinder(BaseFinder):
     '''
     Helper to get appropriate BaseFile instances from the file system.
     '''
-    def __init__(self, base, ignore=(),
+    def __init__(self, base, find_executables=False, ignore=(),
                  find_dotfiles=False, **kargs):
         '''
         Create a FileFinder for files under the given base directory.
 
         The find_executables argument determines whether the finder needs to
         try to guess whether files are executables. Disabling this guessing
         when not necessary can speed up the finder significantly.
 
         ``ignore`` accepts an iterable of patterns to ignore. Entries are
         strings that match paths relative to ``base`` using
         ``mozpath.match()``. This means if an entry corresponds
         to a directory, all files under that directory will be ignored. If
         an entry corresponds to a file, that particular file will be ignored.
         '''
-        assert 'find_executables' in kargs
-        find_executables = kargs.pop('find_executables')
         BaseFinder.__init__(self, base, **kargs)
         self.find_dotfiles = find_dotfiles
         self.find_executables = find_executables
         self.ignore = ignore
 
     def _find(self, pattern):
         '''
         Actual implementation of FileFinder.find(), dispatching to specialized
--- a/python/mozbuild/mozpack/manifests.py
+++ b/python/mozbuild/mozpack/manifests.py
@@ -356,17 +356,17 @@ class InstallManifest(object):
                 continue
 
             if install_type == self.OPTIONAL_EXISTS:
                 registry.add(dest, ExistingFile(required=False))
                 continue
 
             if install_type in (self.PATTERN_SYMLINK, self.PATTERN_COPY):
                 _, base, pattern, dest = entry
-                finder = FileFinder(base, find_executables=False)
+                finder = FileFinder(base)
                 paths = [f[0] for f in finder.find(pattern)]
 
                 if install_type == self.PATTERN_SYMLINK:
                     cls = AbsoluteSymlinkFile
                 else:
                     cls = File
 
                 for path in paths:
--- a/python/mozbuild/mozpack/packager/unpack.py
+++ b/python/mozbuild/mozpack/packager/unpack.py
@@ -42,17 +42,17 @@ class UnpackFinder(BaseFinder):
     The only argument to the constructor is a Finder instance or a path.
     The UnpackFinder is populated with files from this Finder instance,
     or with files from a FileFinder using the given path as its root.
     '''
     def __init__(self, source):
         if isinstance(source, BaseFinder):
             self._finder = source
         else:
-            self._finder = FileFinder(source, find_executables=False)
+            self._finder = FileFinder(source)
         self.base = self._finder.base
         self.files = FileRegistry()
         self.kind = 'flat'
         self.omnijar = None
         self.jarlogs = {}
         self.optimizedjars = False
         self.compressed = True
 
--- a/python/mozbuild/mozpack/test/test_files.py
+++ b/python/mozbuild/mozpack/test/test_files.py
@@ -919,39 +919,39 @@ class TestFileFinder(MatchTestTemplate, 
         ensureParentDir(self.tmppath(path))
         open(self.tmppath(path), 'wb').write(path)
 
     def do_check(self, pattern, result):
         do_check(self, self.finder, pattern, result)
 
     def test_file_finder(self):
         self.prepare_match_test(with_dotfiles=True)
-        self.finder = FileFinder(self.tmpdir, find_executables=False)
+        self.finder = FileFinder(self.tmpdir)
         self.do_match_test()
         self.do_finder_test(self.finder)
 
     def test_get(self):
         self.prepare_match_test()
-        finder = FileFinder(self.tmpdir, find_executables=False)
+        finder = FileFinder(self.tmpdir)
 
         self.assertIsNone(finder.get('does-not-exist'))
         res = finder.get('bar')
         self.assertIsInstance(res, File)
         self.assertEqual(mozpath.normpath(res.path),
                          mozpath.join(self.tmpdir, 'bar'))
 
     def test_ignored_dirs(self):
         """Ignored directories should not have results returned."""
         self.prepare_match_test()
         self.add('fooz')
 
         # Present to ensure prefix matching doesn't exclude.
         self.add('foo/quxz')
 
-        self.finder = FileFinder(self.tmpdir, ignore=['foo/qux'], find_executables=False)
+        self.finder = FileFinder(self.tmpdir, ignore=['foo/qux'])
 
         self.do_check('**', ['bar', 'foo/bar', 'foo/baz', 'foo/quxz', 'fooz'])
         self.do_check('foo/*', ['foo/bar', 'foo/baz', 'foo/quxz'])
         self.do_check('foo/**', ['foo/bar', 'foo/baz', 'foo/quxz'])
         self.do_check('foo/qux/**', [])
         self.do_check('foo/qux/*', [])
         self.do_check('foo/qux/bar', [])
         self.do_check('foo/quxz', ['foo/quxz'])
@@ -959,44 +959,44 @@ class TestFileFinder(MatchTestTemplate, 
 
     def test_ignored_files(self):
         """Ignored files should not have results returned."""
         self.prepare_match_test()
 
         # Be sure prefix match doesn't get ignored.
         self.add('barz')
 
-        self.finder = FileFinder(self.tmpdir, ignore=['foo/bar', 'bar'], find_executables=False)
+        self.finder = FileFinder(self.tmpdir, ignore=['foo/bar', 'bar'])
         self.do_check('**', ['barz', 'foo/baz', 'foo/qux/1', 'foo/qux/2/test',
             'foo/qux/2/test2', 'foo/qux/bar'])
         self.do_check('foo/**', ['foo/baz', 'foo/qux/1', 'foo/qux/2/test',
             'foo/qux/2/test2', 'foo/qux/bar'])
 
     def test_ignored_patterns(self):
         """Ignore entries with patterns should be honored."""
         self.prepare_match_test()
 
         self.add('foo/quxz')
 
-        self.finder = FileFinder(self.tmpdir, ignore=['foo/qux/*'], find_executables=False)
+        self.finder = FileFinder(self.tmpdir, ignore=['foo/qux/*'])
         self.do_check('**', ['foo/bar', 'foo/baz', 'foo/quxz', 'bar'])
         self.do_check('foo/**', ['foo/bar', 'foo/baz', 'foo/quxz'])
 
     def test_dotfiles(self):
         """Finder can find files beginning with . is configured."""
         self.prepare_match_test(with_dotfiles=True)
-        self.finder = FileFinder(self.tmpdir, find_dotfiles=True, find_executables=False)
+        self.finder = FileFinder(self.tmpdir, find_dotfiles=True)
         self.do_check('**', ['bar', 'foo/.foo', 'foo/.bar/foo',
             'foo/bar', 'foo/baz', 'foo/qux/1', 'foo/qux/bar',
             'foo/qux/2/test', 'foo/qux/2/test2'])
 
     def test_dotfiles_plus_ignore(self):
         self.prepare_match_test(with_dotfiles=True)
         self.finder = FileFinder(self.tmpdir, find_dotfiles=True,
-                                 ignore=['foo/.bar/**'], find_executables=False)
+                                 ignore=['foo/.bar/**'])
         self.do_check('foo/**', ['foo/.foo', 'foo/bar', 'foo/baz',
             'foo/qux/1', 'foo/qux/bar', 'foo/qux/2/test', 'foo/qux/2/test2'])
 
 
 class TestJarFinder(MatchTestTemplate, TestWithTmpDir):
     def add(self, path):
         self.jar.add(path, path, compress=True)
 
@@ -1055,18 +1055,18 @@ class TestComposedFinder(MatchTestTempla
     def test_composed_finder(self):
         self.prepare_match_test()
         # Also add files in $tmp/a/foo/qux because ComposedFinder is
         # expected to mask foo/qux entirely with content from $tmp/b.
         ensureParentDir(self.tmppath('a/foo/qux/hoge'))
         open(self.tmppath('a/foo/qux/hoge'), 'wb').write('hoge')
         open(self.tmppath('a/foo/qux/bar'), 'wb').write('not the right content')
         self.finder = ComposedFinder({
-            '': FileFinder(self.tmppath('a'), find_executables=False),
-            'foo/qux': FileFinder(self.tmppath('b'), find_executables=False),
+            '': FileFinder(self.tmppath('a')),
+            'foo/qux': FileFinder(self.tmppath('b')),
         })
         self.do_match_test()
 
         self.assertIsNone(self.finder.get('does-not-exist'))
         self.assertIsInstance(self.finder.get('bar'), File)
 
 
 @unittest.skipUnless(hglib, 'hglib not available')
--- a/python/mozbuild/mozpack/test/test_mozjar.py
+++ b/python/mozbuild/mozpack/test/test_mozjar.py
@@ -240,17 +240,17 @@ class TestJar(unittest.TestCase):
 
         self.assertEqual(files[2].filename, 'baz/qux')
         self.assertTrue(files[2].compressed)
         self.assertEqual(files[2].read(), 'aaaaaaaaaaaaanopqrstuvwxyz')
 
     def test_add_from_finder(self):
         s = MockDest()
         with JarWriter(fileobj=s, optimize=self.optimize) as jar:
-            finder = FileFinder(test_data_path, find_executables=False)
+            finder = FileFinder(test_data_path)
             for p, f in finder.find('test_data'):
                 jar.add('test_data', f)
 
         jar = JarReader(fileobj=s)
         files = [j for j in jar]
 
         self.assertEqual(files[0].filename, 'test_data')
         self.assertFalse(files[0].compressed)
--- a/python/mozbuild/mozpack/test/test_unify.py
+++ b/python/mozbuild/mozpack/test/test_unify.py
@@ -41,35 +41,35 @@ class TestUnifiedFinder(TestUnified):
         self.create_one('a', 'bar', 'bar')
         self.create_one('b', 'baz', 'baz')
         self.create_one('a', 'qux', 'foobar')
         self.create_one('b', 'qux', 'baz')
         self.create_one('a', 'test/foo', 'a\nb\nc\n')
         self.create_one('b', 'test/foo', 'b\nc\na\n')
         self.create_both('test/bar', 'a\nb\nc\n')
 
-        finder = UnifiedFinder(FileFinder(self.tmppath('a'), find_executables=False),
-                               FileFinder(self.tmppath('b'), find_executables=False),
+        finder = UnifiedFinder(FileFinder(self.tmppath('a')),
+                               FileFinder(self.tmppath('b')),
                                sorted=['test'])
         self.assertEqual(sorted([(f, c.open().read())
                                  for f, c in finder.find('foo')]),
                          [('foo/bar', 'foobar'), ('foo/baz', 'foobaz')])
         self.assertRaises(ErrorMessage, any, finder.find('bar'))
         self.assertRaises(ErrorMessage, any, finder.find('baz'))
         self.assertRaises(ErrorMessage, any, finder.find('qux'))
         self.assertEqual(sorted([(f, c.open().read())
                                  for f, c in finder.find('test')]),
                          [('test/bar', 'a\nb\nc\n'),
                           ('test/foo', 'a\nb\nc\n')])
 
 
 class TestUnifiedBuildFinder(TestUnified):
     def test_unified_build_finder(self):
-        finder = UnifiedBuildFinder(FileFinder(self.tmppath('a'), find_executables=False),
-                                    FileFinder(self.tmppath('b'), find_executables=False))
+        finder = UnifiedBuildFinder(FileFinder(self.tmppath('a')),
+                                    FileFinder(self.tmppath('b')))
 
         # Test chrome.manifest unification
         self.create_both('chrome.manifest', 'a\nb\nc\n')
         self.create_one('a', 'chrome/chrome.manifest', 'a\nb\nc\n')
         self.create_one('b', 'chrome/chrome.manifest', 'b\nc\na\n')
         self.assertEqual(sorted([(f, c.open().read()) for f, c in
                                  finder.find('**/chrome.manifest')]),
                          [('chrome.manifest', 'a\nb\nc\n'),
--- a/python/mozlint/mozlint/pathutils.py
+++ b/python/mozlint/mozlint/pathutils.py
@@ -17,17 +17,17 @@ class FilterPath(object):
         self._finder = None
         self.exclude = exclude
 
     @property
     def finder(self):
         if self._finder:
             return self._finder
         self._finder = FileFinder(
-            self.path, find_executables=False, ignore=self.exclude)
+            self.path, ignore=self.exclude)
         return self._finder
 
     @property
     def ext(self):
         return os.path.splitext(self.path)[1]
 
     @property
     def exists(self):
--- a/tools/docs/moztreedocs/__init__.py
+++ b/tools/docs/moztreedocs/__init__.py
@@ -77,17 +77,17 @@ class SphinxManager(object):
     def _generate_python_api_docs(self):
         """Generate Python API doc files."""
         out_dir = os.path.join(self._docs_dir, 'python')
         base_args = ['sphinx', '--no-toc', '-o', out_dir]
 
         for p in sorted(self._python_package_dirs):
             full = os.path.join(self._topsrcdir, p)
 
-            finder = FileFinder(full, find_executables=False)
+            finder = FileFinder(full)
             dirs = {os.path.dirname(f[0]) for f in finder.find('**')}
 
             excludes = {d for d in dirs if d.endswith('test')}
 
             args = list(base_args)
             args.append(full)
             args.extend(excludes)