From 149ba235d99850ef44833640cd652b6265aa598a Mon Sep 17 00:00:00 2001 From: Alex Pyrgiotis Date: Wed, 9 Oct 2024 21:54:58 +0300 Subject: [PATCH] FIXUP: Fix a deprecation warning for filter= --- install/common/download-tessdata.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install/common/download-tessdata.py b/install/common/download-tessdata.py index c35d4b32f..cf2b3660f 100644 --- a/install/common/download-tessdata.py +++ b/install/common/download-tessdata.py @@ -77,6 +77,12 @@ def main(): for lang in langs_short: member = f"tessdata_fast-{tag}/{lang}.traineddata" logger.info(f"Extracting {member}") + # NOTE: We want `filter="data"` because it ignores ownership info, as + # recorded in the tarfile. This filter will become the default in Python + # 3.14. See: + # + # https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter + t.extract(member=member, path=share_dir, filter="data") tessdata_dl_dir = share_dir / f"tessdata_fast-{tag}" tessdata_dl_dir.rename(tessdata_dir)