From 38b833347b344eec26e36b66b66eb1a819e11690 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Wed, 20 Mar 2024 04:52:28 -0700 Subject: [PATCH] [fbsync] Remove deprecated distutils usage for Python 3.12 (#8280) Summary: Co-authored-by: vfdev Reviewed By: vmoens Differential Revision: D55062781 fbshipit-source-id: f4d98758e3e8d4bdf6781a7ecace06ede5d132de --- test/test_datasets_download.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_datasets_download.py b/test/test_datasets_download.py index cf0211dbb1e..71aeb9ea774 100644 --- a/test/test_datasets_download.py +++ b/test/test_datasets_download.py @@ -1,12 +1,12 @@ import contextlib import itertools +import shutil import tempfile import time import traceback import unittest.mock import warnings from datetime import datetime -from distutils import dir_util from os import path from urllib.error import HTTPError, URLError from urllib.parse import urlparse @@ -180,7 +180,7 @@ def collect_urls(dataset_cls, *args, **kwargs): @pytest.fixture(scope="module", autouse=True) def root(): yield ROOT - dir_util.remove_tree(ROOT) + shutil.rmtree(ROOT) def places365():