Leave the tar extraction fallback where it was

Refusing the install on a Python without the extraction filters is a
change to how every archive on every platform is unpacked, and it has
nothing to do with shipping a Vulkan whisper-server. On those Pythons
the download stops working altogether, which is a worse answer than the
one that was there.

Worth doing on its own terms, in its own change, where the versions it
turns away can be argued about without a backend release riding on it.
This commit is contained in:
2026-09-05 09:16:49 +03:00
parent 1f57455a34
commit 956c3eaf3c
2 changed files with 2 additions and 17 deletions
-12
View File
@@ -500,18 +500,6 @@ class InstallProgram(Local):
with self.assertRaises(ggml.LocalError):
self.install("whisper-bin-ubuntu-x64.tar.gz", archive=buf.getvalue())
def test_python_without_safe_tar_filters_refuses_the_archive(self):
archive = self.path("bundle.tar.gz")
archive.write_bytes(self.archive)
destination = self.path("unpacked")
destination.mkdir()
with mock.patch.object(tarfile.TarFile, "extractall",
side_effect=[TypeError("no filter"), None]) as extract:
with self.assertRaises(ggml.LocalError) as caught:
ggml._extract(archive, destination)
self.assertEqual(1, extract.call_count)
self.assertIn("safely", str(caught.exception))
def test_everything_is_asked_for_over_tls(self):
for url in (hub.GITHUB_API, hub.HF_API, hub.HF_FILES):
with self.subTest(url=url):