aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.com>2024-08-22 23:28:16 +0300
committershadchin <shadchin@yandex-team.com>2024-08-22 23:40:02 +0300
commit3cfc201582bc9f384f25d34f4abeea74222bf0f7 (patch)
treed8c2b6f78a9e14b0632cd21414715202d7b2403d
parentb874288489d25f18bcefad50de1844c95c428a00 (diff)
downloadydb-3cfc201582bc9f384f25d34f4abeea74222bf0f7.tar.gz
Fix DeprecationWarning
Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior. https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractall 79005c43af0996c47603d56b5663378c89fa9f2e
-rw-r--r--build/scripts/extract_docs.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/build/scripts/extract_docs.py b/build/scripts/extract_docs.py
index 5fb84a8dcf..5bf19f8866 100644
--- a/build/scripts/extract_docs.py
+++ b/build/scripts/extract_docs.py
@@ -36,7 +36,10 @@ def main():
if not os.path.exists(dest_dir):
os.makedirs(dest_dir)
with tarfile.open(src, 'r') as tar_file:
- tar_file.extractall(dest_dir)
+ if sys.version_info >= (3, 12):
+ tar_file.extractall(dest_dir, filter='data')
+ else:
+ tar_file.extractall(dest_dir)
if __name__ == '__main__':