Skip to content

Commit

Permalink
FIXUP: Fix a deprecation warning for filter=
Browse files Browse the repository at this point in the history
  • Loading branch information
apyrgio committed Oct 9, 2024
1 parent c37ff73 commit 149ba23
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions install/common/download-tessdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 149ba23

Please sign in to comment.