]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-150885: Remove unused shutil._ensure_directory (GH-150883)
authorBernát Gábor <gaborjbernat@gmail.com>
Sun, 7 Jun 2026 14:40:55 +0000 (07:40 -0700)
committerGitHub <noreply@github.com>
Sun, 7 Jun 2026 14:40:55 +0000 (17:40 +0300)
No longer used after gh-146581 (GH-146591).

Lib/shutil.py

index 4d5a283662101c49bdcc332c9414cdc09998c3d3..5095318da2331461e06b56d905a462381f9e5e69 100644 (file)
@@ -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`
     """