From 8d0320de75f69550b78ca8000d7f928d9936b343 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 3 May 2021 00:07:12 -0400 Subject: [PATCH 1/2] Fix deprecated gzipfile constructor argument. --- python/servo/command_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 1a5cc75e746..7b4fd6ab544 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -120,7 +120,7 @@ def archive_deterministically(dir_to_archive, dest_archive, prepend_path=None): arcname = os.path.normpath(os.path.join(prepend_path, arcname)) zip_file.write(entry, arcname=arcname) else: - with gzip.GzipFile('wb', fileobj=out_file, mtime=0) as gzip_file: + with gzip.GzipFile(mode='wb', fileobj=out_file, mtime=0) as gzip_file: with tarfile.open(fileobj=gzip_file, mode='w:') as tar_file: for entry in file_list: arcname = entry From a2356ef105cafa2be9ff91bc224e6408ee3f5beb Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 3 May 2021 00:07:33 -0400 Subject: [PATCH 2/2] Fix bytes/string py3 confusion. --- python/servo/package_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py index 40347661761..02c29ba4d23 100644 --- a/python/servo/package_commands.py +++ b/python/servo/package_commands.py @@ -106,7 +106,7 @@ def get_taskcluster_secret(name): def otool(s): o = subprocess.Popen(['/usr/bin/otool', '-L', s], stdout=subprocess.PIPE) - for line in o.stdout: + for line in map(lambda s: s.decode('ascii'), o.stdout): if line[0] == '\t': yield line.split(' ', 1)[0][1:]