From 62dae1f6533655e8477dbd73413a6c21af112eaa Mon Sep 17 00:00:00 2001 From: Noemi Erli Date: Tue, 9 Jun 2020 20:59:26 +0300 Subject: [PATCH] Backed out 4 changesets (bug 1621960) for causing Android bustages CLOSED TREE Backed out changeset f36a95234a5f (bug 1621960) Backed out changeset 0e4661c9061d (bug 1621960) Backed out changeset 3e2cbe4dd777 (bug 1621960) Backed out changeset d7eb101e5df7 (bug 1621960) --- build/pgo/genpgocert.py | 5 ++--- mach | 1 + python/mach_commands.py | 4 ++-- taskcluster/scripts/tester/test-linux.sh | 2 +- testing/mozbase/mozhttpd/mozhttpd/mozhttpd.py | 6 +++--- testing/profiles/profile | 3 +-- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/build/pgo/genpgocert.py b/build/pgo/genpgocert.py index 71df41807aeb..1188d5c6b591 100644 --- a/build/pgo/genpgocert.py +++ b/build/pgo/genpgocert.py @@ -55,8 +55,7 @@ def runUtil(util, args, inputdata=None, outputstream=None): env[pathvar] = app_path proc = subprocess.Popen([util] + args, env=env, stdin=subprocess.PIPE if inputdata else None, - stdout=outputstream, - universal_newlines=True) + stdout=outputstream) proc.communicate(inputdata) return proc.returncode @@ -102,7 +101,7 @@ def constructCertDatabase(build, srcDir): pykey = os.path.join(build.topsrcdir, "security", "manager", "ssl", "tests", "unit", "pykey.py") - with NamedTemporaryFile(mode="wt+") as pwfile, TemporaryDirectory() as pemfolder: + with NamedTemporaryFile() as pwfile, TemporaryDirectory() as pemfolder: pwfile.write("\n") pwfile.flush() diff --git a/mach b/mach index 6621b4b87df5..3360daf983fb 100755 --- a/mach +++ b/mach @@ -33,6 +33,7 @@ py2commands=" mochitest mozharness prettier-format + python python-test raptor raptor-test diff --git a/python/mach_commands.py b/python/mach_commands.py index 79ecd65666db..a7b984c17958 100644 --- a/python/mach_commands.py +++ b/python/mach_commands.py @@ -56,12 +56,12 @@ class MachCommands(MachCommandBase): # Note: subprocess requires native strings in os.environ on Windows. append_env = { - 'PYTHONDONTWRITEBYTECODE': str('1'), + b'PYTHONDONTWRITEBYTECODE': str('1'), } if no_virtualenv: python_path = sys.executable - append_env['PYTHONPATH'] = os.pathsep.join(sys.path) + append_env[b'PYTHONPATH'] = os.pathsep.join(sys.path) else: self._activate_virtualenv() python_path = self.virtualenv_manager.python_path diff --git a/taskcluster/scripts/tester/test-linux.sh b/taskcluster/scripts/tester/test-linux.sh index 8157ea3a016a..77d9a9d00376 100755 --- a/taskcluster/scripts/tester/test-linux.sh +++ b/taskcluster/scripts/tester/test-linux.sh @@ -207,7 +207,7 @@ fi # Use |mach python| if a source checkout exists so in-tree packages are # available. -[[ -x "${GECKO_PATH}/mach" ]] && python="python2.7 ${GECKO_PATH}/mach python" || python="python2.7" +[[ -x "${GECKO_PATH}/mach" ]] && python="${GECKO_PATH}/mach python" || python="python2.7" # Save the computed mozharness command to a binary which is useful for # interactive mode. diff --git a/testing/mozbase/mozhttpd/mozhttpd/mozhttpd.py b/testing/mozbase/mozhttpd/mozhttpd/mozhttpd.py index 5502c5d4fdd5..32bf4efe25d4 100755 --- a/testing/mozbase/mozhttpd/mozhttpd/mozhttpd.py +++ b/testing/mozbase/mozhttpd/mozhttpd/mozhttpd.py @@ -144,7 +144,7 @@ class RequestHandler(SimpleHTTPRequestHandler): else: self.send_response(404) self.end_headers() - self.wfile.write(b'') + self.wfile.write('') def do_POST(self): # if we don't have a match, we always fall through to 404 (this may @@ -153,7 +153,7 @@ class RequestHandler(SimpleHTTPRequestHandler): if not self._try_handler('POST'): self.send_response(404) self.end_headers() - self.wfile.write(b'') + self.wfile.write('') def do_DEL(self): # if we don't have a match, we always fall through to 404 (this may @@ -162,7 +162,7 @@ class RequestHandler(SimpleHTTPRequestHandler): if not self._try_handler('DEL'): self.send_response(404) self.end_headers() - self.wfile.write(b'') + self.wfile.write('') def translate_path(self, path): # this is taken from SimpleHTTPRequestHandler.translate_path(), diff --git a/testing/profiles/profile b/testing/profiles/profile index d946f155e6c4..ae7bd1e76bbc 100755 --- a/testing/profiles/profile +++ b/testing/profiles/profile @@ -264,8 +264,7 @@ def rm(profile, pref_file): def cli(args=sys.argv[1:]): parser = ArgumentParser() - subparsers = parser.add_subparsers(dest='func') - subparsers.required = True + subparsers = parser.add_subparsers() diff_parser = subparsers.add_parser('diff') diff_parser.add_argument('a', metavar='A',