Skip to content

Commit c5dd476

Browse files
authored
Replace usage of deprecated distutils.(file|dir)_util
Differential Revision: D73804939 Pull Request resolved: #10530
1 parent 7b86bf1 commit c5dd476

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/source/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
# add these directories to sys.path here. If the directory is relative to the
1919
# documentation root, use os.path.abspath to make it absolute, like shown here.
2020
#
21-
import distutils.file_util
2221
import glob
2322
import os
23+
import shutil
2424
import sys
2525
from typing import Any
2626

@@ -135,7 +135,7 @@
135135
# Copy .md files from source dir to gallery dir
136136
for f in glob.glob(os.path.join(source_dir, "*.md")):
137137

138-
distutils.file_util.copy_file(f, gallery_dir, update=True)
138+
shutil.copyfile(f, gallery_dir)
139139

140140
source_suffix = [".rst", ".md"]
141141

0 commit comments

Comments
 (0)