From: Bernát Gábor Date: Sun, 7 Jun 2026 14:40:55 +0000 (-0700) Subject: gh-150885: Remove unused shutil._ensure_directory (GH-150883) X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=e5ced1f7788e77e318165b331d967156f81d6709;p=thirdparty%2FPython%2Fcpython.git gh-150885: Remove unused shutil._ensure_directory (GH-150883) No longer used after gh-146581 (GH-146591). --- diff --git a/Lib/shutil.py b/Lib/shutil.py index 4d5a28366210..5095318da233 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -1307,12 +1307,6 @@ def unregister_unpack_format(name): """Removes the pack format from the registry.""" del _UNPACK_FORMATS[name] -def _ensure_directory(path): - """Ensure that the parent directory of `path` exists""" - dirname = os.path.dirname(path) - if not os.path.isdir(dirname): - os.makedirs(dirname) - def _unpack_zipfile(filename, extract_dir): """Unpack zip `filename` to `extract_dir` """