Skip to content

gh-132983: Introduce compression package and move _compression module #133018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 27, 2025

Conversation

emmatyping
Copy link
Member

@emmatyping emmatyping commented Apr 26, 2025

This is part 1 of the Implementation Plan for PEP 784.

This change:

  • introduces a compression package and re-exports existing modules under that package.
  • Moves Lib/_compression.py to Lib/compression/_common/streams.py and updates imports to match.

I added skip news as I'd like to write a holistic NEWS/What's New entry once the entire implementation has landed. If people think each PR should have NEWS I can write something up.

This commit introduces the `compression` package, specified in PEP 784
to re-export the `lzma`, `bz2`, `gzip`, and `zlib` modules. Introduction
of `compression.zstd` will be completed in a future commit once the
`_zstd` module is merged.

This commit also moves the `_compression` private module to
`compression._common.streams`.
@picnixz
Copy link
Member

picnixz commented Apr 26, 2025

(You need to run make regen-stdlib-module-names for the stdlib module names to be updated)

@emmatyping
Copy link
Member Author

emmatyping commented Apr 26, 2025

@picnixz

(You need to run make regen-stdlib-module-names for the stdlib module names to be updated)

Yeah, unfortunately generate_stdlib_module_names.py doesn't seem to handle nested packages, so I am fixing that so compression.* will be included.

E: s/modules/packages/

Also update `generate_stdlib_module_names.py` to collect `compression`,
a namespace package.
Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some imports are not sorted but they are part of the test and tests imports don't follow a specific convention (unless we manage to). In general, we try to keep the convention within the same file.

@emmatyping
Copy link
Member Author

Some imports are not sorted but they are part of the test and tests imports don't follow a specific convention

Good to know, sorry I am not very familiar with the import ordering conventions!

@picnixz
Copy link
Member

picnixz commented Apr 26, 2025

Good to know, sorry I am not very familiar with the import ordering conventions!

Officially, there is no convention so it's fine! The modules I maintain have sorted imports because it's easier to find what I want but other modules have what I call chronological imports (i.e., once you need another module, a new line is added). There are benefits in both: the first is "purer" (although it's subjective) while the latter eases diffs.

I try to minimize the diffs in general even if it goes against my own conventions (and minimizing the diff is generally achieved by keeping the same convention as the current file).

@emmatyping emmatyping force-pushed the compression_package branch from 46c7e21 to 2e1b2a8 Compare April 26, 2025 23:36
@gpshead gpshead merged commit 20be6ba into python:main Apr 27, 2025
41 checks passed
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot x86 Debian Installed with X 3.x (no tier) has failed when building commit 20be6ba.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1244/builds/5137) and take a look at the build logs.
  4. Check if the failure is related to this commit (20be6ba) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1244/builds/5137

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/shutil.py"�[0m, line �[35m1331�[0m, in �[35m_unpack_tarfile�[0m
    tarobj = tarfile.open(filename)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/tarfile.py"�[0m, line �[35m1866�[0m, in �[35mopen�[0m
    raise ReadError(f"file could not be opened successfully:\n{error_msgs_summary}")
�[1;35mtarfile.ReadError�[0m: �[35mfile could not be opened successfully:
- method gz: CompressionError('gzip module is not available')
- method bz2: CompressionError('bz2 module is not available')
- method xz: CompressionError('lzma module is not available')
- method tar: ReadError('truncated header')�[0m


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/libregrtest/single.py", line 210, in _runtest_env_changed_exc
    _load_run_test(result, runtests)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/libregrtest/single.py", line 155, in _load_run_test
    test_mod = importlib.import_module(module_name)
  File "/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1398, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 762, in exec_module
  File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed
  File "/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/test_lzma.py", line 9, in <module>
    from compression._common import _streams
ModuleNotFoundError: No module named 'compression'
�[0m


Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/test_shutil.py"�[0m, line �[35m1691�[0m, in �[35mtest_make_tarfile_without_rootdir�[0m
    �[31mself.assertTrue�[0m�[1;31m(tarfile.is_tarfile(archive))�[0m
    �[31m~~~~~~~~~~~~~~~�[0m�[1;31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m
�[1;35mAssertionError�[0m: �[35mFalse is not true�[0m


Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/test_shutil.py"�[0m, line �[35m2150�[0m, in �[35mtest_unpack_archive_gztar�[0m
    �[31mself.check_unpack_tarball�[0m�[1;31m('gztar')�[0m
    �[31m~~~~~~~~~~~~~~~~~~~~~~~~~�[0m�[1;31m^^^^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/test_shutil.py"�[0m, line �[35m2142�[0m, in �[35mcheck_unpack_tarball�[0m
    �[31mself.check_unpack_archive�[0m�[1;31m(format, filter='fully_trusted')�[0m
    �[31m~~~~~~~~~~~~~~~~~~~~~~~~~�[0m�[1;31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/test_shutil.py"�[0m, line �[35m2111�[0m, in �[35mcheck_unpack_archive�[0m
    �[31mself.check_unpack_archive_with_converter�[0m�[1;31m(�[0m
    �[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~�[0m�[1;31m^�[0m
        �[1;31mformat, lambda path: path, **kwargs)�[0m
        �[1;31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/test_shutil.py"�[0m, line �[35m2127�[0m, in �[35mcheck_unpack_archive_with_converter�[0m
    �[31munpack_archive�[0m�[1;31m(converter(filename), converter(tmpdir2), **kwargs)�[0m
    �[31m~~~~~~~~~~~~~~�[0m�[1;31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/shutil.py"�[0m, line �[35m1415�[0m, in �[35munpack_archive�[0m
    �[31mfunc�[0m�[1;31m(filename, extract_dir, **kwargs)�[0m
    �[31m~~~~�[0m�[1;31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/shutil.py"�[0m, line �[35m1333�[0m, in �[35m_unpack_tarfile�[0m
    raise ReadError(
        "%s is not a compressed or uncompressed tar file" % filename)
�[1;35mshutil.ReadError�[0m: �[35m/tmp/test_python_9h9mmz_c/test_python_21506æ/tmpt7gkyxui/archive.tar.gz is not a compressed or uncompressed tar file�[0m


Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/test_shutil.py"�[0m, line �[35m1961�[0m, in �[35mtest_tarfile_root_owner�[0m
    archive = tarfile.open(archive_name)
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/tarfile.py"�[0m, line �[35m1866�[0m, in �[35mopen�[0m
    raise ReadError(f"file could not be opened successfully:\n{error_msgs_summary}")
�[1;35mtarfile.ReadError�[0m: �[35mfile could not be opened successfully:
- method gz: CompressionError('gzip module is not available')
- method bz2: CompressionError('bz2 module is not available')
- method xz: CompressionError('lzma module is not available')
- method tar: ReadError('truncated header')�[0m


Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/test_shutil.py"�[0m, line �[35m2150�[0m, in �[35mtest_unpack_archive_gztar�[0m
    �[31mself.check_unpack_tarball�[0m�[1;31m('gztar')�[0m
    �[31m~~~~~~~~~~~~~~~~~~~~~~~~~�[0m�[1;31m^^^^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/test_shutil.py"�[0m, line �[35m2142�[0m, in �[35mcheck_unpack_tarball�[0m
    �[31mself.check_unpack_archive�[0m�[1;31m(format, filter='fully_trusted')�[0m
    �[31m~~~~~~~~~~~~~~~~~~~~~~~~~�[0m�[1;31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/test_shutil.py"�[0m, line �[35m2111�[0m, in �[35mcheck_unpack_archive�[0m
    �[31mself.check_unpack_archive_with_converter�[0m�[1;31m(�[0m
    �[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~�[0m�[1;31m^�[0m
        �[1;31mformat, lambda path: path, **kwargs)�[0m
        �[1;31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/test_shutil.py"�[0m, line �[35m2127�[0m, in �[35mcheck_unpack_archive_with_converter�[0m
    �[31munpack_archive�[0m�[1;31m(converter(filename), converter(tmpdir2), **kwargs)�[0m
    �[31m~~~~~~~~~~~~~~�[0m�[1;31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/shutil.py"�[0m, line �[35m1415�[0m, in �[35munpack_archive�[0m
    �[31mfunc�[0m�[1;31m(filename, extract_dir, **kwargs)�[0m
    �[31m~~~~�[0m�[1;31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/shutil.py"�[0m, line �[35m1333�[0m, in �[35m_unpack_tarfile�[0m
    raise ReadError(
        "%s is not a compressed or uncompressed tar file" % filename)
�[1;35mshutil.ReadError�[0m: �[35m/tmp/test_python_dbw2aaxz/test_python_13358æ/tmp39bg5feu/archive.tar.gz is not a compressed or uncompressed tar file�[0m


Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/test_shutil.py"�[0m, line �[35m1757�[0m, in �[35mtest_tarfile_vs_tar�[0m
    self.assertEqual(�[31mself._tarinfo�[0m�[1;31m(tarball)�[0m, self._tarinfo(tarball2))
                     �[31m~~~~~~~~~~~~~�[0m�[1;31m^^^^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/test_shutil.py"�[0m, line �[35m1620�[0m, in �[35m_tarinfo�[0m
    with �[31mtarfile.open�[0m�[1;31m(path)�[0m as tar:
         �[31m~~~~~~~~~~~~�[0m�[1;31m^^^^^^�[0m
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/tarfile.py"�[0m, line �[35m1866�[0m, in �[35mopen�[0m
    raise ReadError(f"file could not be opened successfully:\n{error_msgs_summary}")
�[1;35mtarfile.ReadError�[0m: �[35mfile could not be opened successfully:
- method gz: CompressionError('gzip module is not available')
- method bz2: CompressionError('bz2 module is not available')
- method xz: CompressionError('lzma module is not available')
- method tar: ReadError('truncated header')�[0m


Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/libregrtest/single.py", line 210, in _runtest_env_changed_exc
    _load_run_test(result, runtests)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/libregrtest/single.py", line 155, in _load_run_test
    test_mod = importlib.import_module(module_name)
  File "/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1398, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 762, in exec_module
  File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed
  File "/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/test_bz2.py", line 19, in <module>
    from compression._common import _streams
ModuleNotFoundError: No module named 'compression'
�[0m

@StanFromIreland
Copy link
Contributor

Fails are related.

@emmatyping
Copy link
Member Author

Yes, it looks like I need to add the compression packages to Makefile.pre.in to install. Just verifying the fix works before pushing.

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot iOS ARM64 Simulator 3.x (tier-3) has failed when building commit 20be6ba.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1380/builds/3412) and take a look at the build logs.
  4. Check if the failure is related to this commit (20be6ba) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1380/builds/3412

Failed tests:

  • test_shutil
  • test_bz2
  • test_largefile
  • test_lzma

Failed subtests:

  • test_make_tarfile_without_rootdir - test.test_shutil.TestArchives.test_make_tarfile_without_rootdir
  • test_it - test.test_largefile.TestSocketSendfile.test_it
  • test_unpack_archive_gztar - test.test_shutil.TestArchives.test_unpack_archive_gztar

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/test_largefile.py", line 183, in wrapper
    return fun(*args, **kwargs)
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/test_largefile.py", line 247, in test_it
    with socket.create_server(("", port)) as sock:
         ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/socket.py", line 955, in create_server
    raise error(err.errno, msg) from None
OSError: [Errno 48] Address already in use (while attempting to bind on address ('', 51418))


Traceback (most recent call last):
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/libregrtest/single.py", line 210, in _runtest_env_changed_exc
    _load_run_test(result, runtests)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/libregrtest/single.py", line 155, in _load_run_test
    test_mod = importlib.import_module(module_name)
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1398, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 762, in exec_module
  File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/test_bz2.py", line 19, in <module>
    from compression._common import _streams
ModuleNotFoundError: No module named 'compression'


Traceback (most recent call last):
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/test_shutil.py", line 1691, in test_make_tarfile_without_rootdir
    self.assertTrue(tarfile.is_tarfile(archive))
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true


Traceback (most recent call last):
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/libregrtest/single.py", line 210, in _runtest_env_changed_exc
    _load_run_test(result, runtests)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/libregrtest/single.py", line 155, in _load_run_test
    test_mod = importlib.import_module(module_name)
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1398, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 762, in exec_module
  File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/test_lzma.py", line 9, in <module>
    from compression._common import _streams
ModuleNotFoundError: No module named 'compression'


Traceback (most recent call last):
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/threading.py", line 1079, in _bootstrap_inner
    self._context.run(self.run)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/threading.py", line 1021, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/test_interpreters/test_stress.py", line 47, in run
    interp = interpreters.create()
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/support/interpreters/__init__.py", line 76, in create
    id = _interpreters.create(reqrefs=True)
interpreters.InterpreterError: interpreter creation failed
k


Traceback (most recent call last):
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/test_shutil.py", line 2150, in test_unpack_archive_gztar
    self.check_unpack_tarball('gztar')
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/test_shutil.py", line 2142, in check_unpack_tarball
    self.check_unpack_archive(format, filter='fully_trusted')
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/test_shutil.py", line 2111, in check_unpack_archive
    self.check_unpack_archive_with_converter(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        format, lambda path: path, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/test_shutil.py", line 2127, in check_unpack_archive_with_converter
    unpack_archive(converter(filename), converter(tmpdir2), **kwargs)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/shutil.py", line 1415, in unpack_archive
    func(filename, extract_dir, **kwargs)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/shutil.py", line 1333, in _unpack_tarfile
    raise ReadError(
        "%s is not a compressed or uncompressed tar file" % filename)
shutil.ReadError: /Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Data/Application/F8E92DEC-C566-4A92-AE44-01AF3D6FCF16/tmp/test_python_worker_6059æ/tmp68ejuorz/archive.tar.gz is not a compressed or uncompressed tar file


Traceback (most recent call last):
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/test_shutil.py", line 2150, in test_unpack_archive_gztar
    self.check_unpack_tarball('gztar')
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/test_shutil.py", line 2142, in check_unpack_tarball
    self.check_unpack_archive(format, filter='fully_trusted')
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/test_shutil.py", line 2111, in check_unpack_archive
    self.check_unpack_archive_with_converter(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        format, lambda path: path, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/test/test_shutil.py", line 2127, in check_unpack_archive_with_converter
    unpack_archive(converter(filename), converter(tmpdir2), **kwargs)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/shutil.py", line 1415, in unpack_archive
    func(filename, extract_dir, **kwargs)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/shutil.py", line 1333, in _unpack_tarfile
    raise ReadError(
        "%s is not a compressed or uncompressed tar file" % filename)
shutil.ReadError: /Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Data/Application/F8E92DEC-C566-4A92-AE44-01AF3D6FCF16/tmp/test_python_worker_6059æ/tmpnvbljx7y/archive.tar.gz is not a compressed or uncompressed tar file


Traceback (most recent call last):
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/shutil.py", line 1331, in _unpack_tarfile
    tarobj = tarfile.open(filename)
  File "/Users/buildbot/Library/Developer/XCTestDevices/3A404F41-86B9-4CE5-9415-6BD112E026F5/data/Containers/Bundle/Application/B0D420F9-4362-48F1-823E-B6F074B20BF5/iOSTestbed.app/python/lib/python3.14/tarfile.py", line 1866, in open
    raise ReadError(f"file could not be opened successfully:\134n{error_msgs_summary}")
tarfile.ReadError: file could not be opened successfully:
- method gz: CompressionError('gzip module is not available')
- method bz2: CompressionError('bz2 module is not available')
- method xz: CompressionError('lzma module is not available')
- method tar: ReadError('truncated header')

@emmatyping
Copy link
Member Author

PR with fix: #133063

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants