diff --git a/python/mozbuild/mozpack/archive.py b/python/mozbuild/mozpack/archive.py index 44fde17d84f5..06f5b4df7ac2 100644 --- a/python/mozbuild/mozpack/archive.py +++ b/python/mozbuild/mozpack/archive.py @@ -30,7 +30,10 @@ def create_tar_from_files(fp, files): FUTURE accept a filename argument (or create APIs to write files) """ - with tarfile.open(name='', mode='w', fileobj=fp, dereference=True) as tf: + # The format is explicitly set to tarfile.GNU_FORMAT, because this default format + # has been changed in Python 3.8. + with tarfile.open(name='', mode='w', fileobj=fp, dereference=True, + format=tarfile.GNU_FORMAT) as tf: for archive_path, f in sorted(files.items()): if not isinstance(f, BaseFile): f = File(f) diff --git a/taskcluster/taskgraph/test/test_util_docker.py b/taskcluster/taskgraph/test/test_util_docker.py index e1ac0da3d34d..099fbb67f5ff 100644 --- a/taskcluster/taskgraph/test/test_util_docker.py +++ b/taskcluster/taskgraph/test/test_util_docker.py @@ -7,12 +7,10 @@ from __future__ import absolute_import, print_function, unicode_literals import os import shutil import stat -import sys import tarfile import tempfile import unittest import mock -import pytest import taskcluster_urls as liburls from taskgraph.util import docker @@ -24,10 +22,6 @@ MODE_STANDARD = stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH @mock.patch.dict('os.environ', {'TASKCLUSTER_ROOT_URL': liburls.test_root_url()}) class TestDocker(unittest.TestCase): - - @pytest.mark.xfail( - sys.version_info >= (3, 0), reason="python3 migration is not complete" - ) def test_generate_context_hash(self): tmpdir = tempfile.mkdtemp() try: @@ -81,9 +75,6 @@ class TestDocker(unittest.TestCase): with MockedOpen(files): self.assertEqual(docker.docker_image('myimage', by_tag=True), "mozilla/myimage:1.2.3") - @pytest.mark.xfail( - sys.version_info >= (3, 0), reason="python3 migration is not complete" - ) def test_create_context_tar_basic(self): tmp = tempfile.mkdtemp() try: @@ -110,9 +101,6 @@ class TestDocker(unittest.TestCase): finally: shutil.rmtree(tmp) - @pytest.mark.xfail( - sys.version_info >= (3, 0), reason="python3 migration is not complete" - ) def test_create_context_topsrcdir_files(self): tmp = tempfile.mkdtemp() try: @@ -183,9 +171,6 @@ class TestDocker(unittest.TestCase): finally: shutil.rmtree(tmp) - @pytest.mark.xfail( - sys.version_info >= (3, 0), reason="python3 migration is not complete" - ) def test_create_context_extra_directory(self): tmp = tempfile.mkdtemp() try: