Skip to content

Commit b99a25e

Browse files
committed
Do not use filter keyword arg with tar.extractall
It was added in Python 3.12, so too new for our minimum target of 3.9. And anyway, the filter argument is supposed to be a callable, not a str.
1 parent d524049 commit b99a25e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/appose/util/download.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def un_tar(input_file: Path, output_dir: Path) -> None:
193193
output_dir.mkdir(parents=True, exist_ok=True)
194194

195195
with tarfile.open(input_file, "r") as tar:
196-
tar.extractall(path=output_dir, filter="data")
196+
tar.extractall(path=output_dir)
197197

198198

199199
def un_tar_gz(input_file: Path, output_dir: Path) -> None:
@@ -214,7 +214,7 @@ def un_tar_gz(input_file: Path, output_dir: Path) -> None:
214214
output_dir.mkdir(parents=True, exist_ok=True)
215215

216216
with tarfile.open(input_file, "r:gz") as tar:
217-
tar.extractall(path=output_dir, filter="data")
217+
tar.extractall(path=output_dir)
218218

219219

220220
def un_tar_bz2(input_file: Path, output_dir: Path) -> None:

0 commit comments

Comments
 (0)