Title: Remove unused private function shutil._ensure_directory · Issue #150885 · python/cpython · GitHub
Open Graph Title: Remove unused private function shutil._ensure_directory · Issue #150885 · python/cpython
X Title: Remove unused private function shutil._ensure_directory · Issue #150885 · python/cpython
Description: shutil._ensure_directory(path) has no caller and can be removed. #8295 added it with shutil.unpack_archive() to create the parent directory of each extracted member. GH-146591 (gh-146581), the ZIP path-traversal fix, reworked _unpack_zip...
Open Graph Description: shutil._ensure_directory(path) has no caller and can be removed. #8295 added it with shutil.unpack_archive() to create the parent directory of each extracted member. GH-146591 (gh-146581), the ZIP ...
X Description: shutil._ensure_directory(path) has no caller and can be removed. #8295 added it with shutil.unpack_archive() to create the parent directory of each extracted member. GH-146591 (gh-146581), the ZIP ...
Opengraph URL: https://github.com/python/cpython/issues/150885
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Remove unused private function shutil._ensure_directory","articleBody":"`shutil._ensure_directory(path)` has no caller and can be removed.\n\n- #8295 added it with `shutil.unpack_archive()` to create the parent directory of each extracted member.\n- GH-146591 (gh-146581), the ZIP path-traversal fix, reworked `_unpack_zipfile()` to create directories inline and deleted the last `_ensure_directory(targetpath)` call.\n\nA word-boundary search across `Lib`, `Modules`, `Python`, `Objects`, and `Include` finds no reference outside its own definition, and a GitHub code search finds no downstream importer.\n","author":{"url":"https://github.com/gaborbernat","@type":"Person","name":"gaborbernat"},"datePublished":"2026-06-03T19:46:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/150885/cpython/issues/150885"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c7a1eb78-0596-dbb7-0ac9-284546088a4d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8220:32C7A1:9294CF:C916D4:6A555137 |
| html-safe-nonce | 259930f7f8db382951db39d1749d1aa36a8e84c5db43f1d1645e75cc574a7241 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjIwOjMyQzdBMTo5Mjk0Q0Y6QzkxNkQ0OjZBNTU1MTM3IiwidmlzaXRvcl9pZCI6Ijc2MDg4MjQ0NzY5NDA0NTYyNDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3608eeb3970916a25a640b45ef725fb76555a5b64c225e0bfc704766961554eb |
| hovercard-subject-tag | issue:4583121220 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/150885/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f81f601214960d609f5c017abbefabaa4d0b6af3216918f2b2fe4171ea52de9d/python/cpython/issues/150885 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f81f601214960d609f5c017abbefabaa4d0b6af3216918f2b2fe4171ea52de9d/python/cpython/issues/150885 |
| og:image:alt | shutil._ensure_directory(path) has no caller and can be removed. #8295 added it with shutil.unpack_archive() to create the parent directory of each extracted member. GH-146591 (gh-146581), the ZIP ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gaborbernat |
| hostname | github.com |
| expected-hostname | github.com |
| None | cd9eea424140838b22e9eabd53d92b5702617ddd6d76efcd3a37f08d44309ca5 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3084b9f587e8f1e19803bbe0c77ac77ce3c99c5c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width