-
-
Notifications
You must be signed in to change notification settings - Fork 342
Open
Description
would it be possible to not use zstandard on python-3.14, but instead the standard library ? to better enjoy the non-experimental nature of free-threading.
Copilote seems to allucinate that it might not be a problem:
elif self.source.endswith(('.tar.zst', '.tar.zstd')):
import tarfile
if sys.version_info[:2] >= (3, 14):
from compression import zstd
import io
with open(archive, "rb") as ifh:
dctx = zstd.ZstdDecompressor()
decompressed = dctx.readall(ifh)
with tarfile.open(fileobj=io.BytesIO(decompressed), mode="r:") as tf:
if sys.version_info[:2] >= (3, 12):
tf.extractall(directory, filter="data")
else:
tf.extractall(directory) # noqa: S202
else:
import zstandard
with open(archive, "rb") as ifh:
dctx = zstandard.ZstdDecompressor()
with dctx.stream_reader(ifh) as reader, tarfile.open(mode="r|", fileobj=reader) as tf:
if sys.version_info[:2] >= (3, 12):
tf.extractall(directory, filter="data")
else:
tf.extractall(directory) # noqa: S202
Metadata
Metadata
Assignees
Labels
No labels