https://github.com/python/cpython/commit/e5ced1f7788e77e318165b331d967156f81d6709
commit: e5ced1f7788e77e318165b331d967156f81d6709
branch: main
author: Bernát Gábor <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-06-07T17:40:55+03:00
summary:

gh-150885: Remove unused shutil._ensure_directory (GH-150883)

No longer used after gh-146581 (GH-146591).

files:
M Lib/shutil.py

diff --git a/Lib/shutil.py b/Lib/shutil.py
index 4d5a283662101c..5095318da23314 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`
     """

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to