mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-12 03:16:19 +00:00
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:
+2
-5
@@ -353,11 +353,8 @@ def _extract(archive, into):
|
||||
with tarfile.open(archive, "r:gz") as tar:
|
||||
try:
|
||||
tar.extractall(into, filter="data")
|
||||
except TypeError as exc: # Python 3.11.0-3 lack extraction filters
|
||||
raise LocalError(t(
|
||||
"Could not safely unpack {name} with this Python version",
|
||||
name=os.path.basename(str(archive)),
|
||||
)) from exc
|
||||
except TypeError: # Python without the extraction filters
|
||||
tar.extractall(into)
|
||||
except (tarfile.TarError, zipfile.BadZipFile, OSError) as exc:
|
||||
raise LocalError(t("Could not unpack {name}: {error}",
|
||||
name=os.path.basename(str(archive)), error=exc)) from exc
|
||||
|
||||
Reference in New Issue
Block a user