Bug 1547730 - Use six.moves.builtins in the sandbox for configure r=#build
☠☠ backed out by ee4b88439111 ☠ ☠
authorJustin Wood <Callek@gmail.com>
Mon, 15 Apr 2019 22:53:41 -0400
changeset 536085 cef492de6a7f54986925e2e2f56cbdcdad04a916
parent 536084 59a1393697e0ac36ee62be71adf58a51904e02b6
child 536086 48f2c4980ad0f2cccf92d9a45c0885db3f1f7b45
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1547730
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1547730 - Use six.moves.builtins in the sandbox for configure r=#build Differential Revision: https://phabricator.services.mozilla.com/D28113
python/mozbuild/mozbuild/configure/__init__.py
--- a/python/mozbuild/mozbuild/configure/__init__.py
+++ b/python/mozbuild/mozbuild/configure/__init__.py
@@ -908,16 +908,18 @@ class ConfigureSandbox(dict):
         if what in ('subprocess.call', 'subprocess.check_call',
                     'subprocess.check_output', 'subprocess.Popen'):
             return getattr(self._wrapped_subprocess, what[len('subprocess.'):])
         # Until this proves to be a performance problem, just construct an
         # import statement and execute it.
         import_line = ''
         if '.' in what:
             _from, what = what.rsplit('.', 1)
+            if _from == '__builtin__' or _from.startswith('__builtin__.'):
+                _from = _from.replace('__builtin__', 'six.moves.builtins')
             import_line += 'from %s ' % _from
         import_line += 'import %s as imported' % what
         glob = {}
         exec_(import_line, {}, glob)
         return glob['imported']
 
     def _resolve_and_set(self, data, name, value, when=None):
         # Don't set anything when --help was on the command line