Skip to content

Commit 1dbc0d6

Browse files
committed
set a no-op filter if extraction filter is supported (Python 3.12+)
1 parent 4321b31 commit 1dbc0d6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jupyter_scheduler/job_files_manager.py

+4
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ def download_tar(self, archive_format: str = "tar"):
7575

7676
with fsspec.open(archive_filepath) as f:
7777
with tarfile.open(fileobj=f, mode=read_mode) as tar:
78+
# if extraction filter is supported (Python 3.12+), set a no-op filter
79+
if hasattr(tar, "extraction_filter"):
80+
tar.extraction_filter = lambda member, path: member
81+
7882
tar.extractall(self.output_dir)
7983

8084
def download(self):

0 commit comments

Comments
 (0)