Title: gh-150885: Remove unused shutil._ensure_directory by gaborbernat · Pull Request #150883 · python/cpython · GitHub
Open Graph Title: gh-150885: Remove unused shutil._ensure_directory by gaborbernat · Pull Request #150883 · python/cpython
X Title: gh-150885: Remove unused shutil._ensure_directory by gaborbernat · Pull Request #150883 · python/cpython
Description: shutil._ensure_directory() arrived in #8295 with shutil.unpack_archive(), where it created the parent directory of each extracted member. The ZIP path-traversal fix in gh-146581 (GH-146591) reworked _unpack_zipfile() to create directories inline and removed the last call to it, so the private helper now has no caller. Nothing in the repository references the name outside its own definition, found by a word-boundary search across Lib, Modules, Python, Objects, and Include, and a GitHub code search turns up no downstream importer. _ensure_directory is private and undocumented, so this has no user-facing effect and needs no Misc/NEWS.d entry. The skip news label applies.
Open Graph Description: shutil._ensure_directory() arrived in #8295 with shutil.unpack_archive(), where it created the parent directory of each extracted member. The ZIP path-traversal fix in gh-146581 (GH-146591) reworke...
X Description: shutil._ensure_directory() arrived in #8295 with shutil.unpack_archive(), where it created the parent directory of each extracted member. The ZIP path-traversal fix in gh-146581 (GH-146591) reworke...
Opengraph URL: https://github.com/python/cpython/pull/150883
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:36355ea3-e139-cd2b-be98-17751254b6bc |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9116:23E740:1970317:2505D96:6A563DE5 |
| html-safe-nonce | 8fd10bfe3fdf4a33948126370ee0cd28265901b9eaeb3933d1b991fa3679599a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTE2OjIzRTc0MDoxOTcwMzE3OjI1MDVEOTY6NkE1NjNERTUiLCJ2aXNpdG9yX2lkIjoiMTg2NjA0MTg4NjA1NTQ4MDgwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d25c7f01e5f2ad7ee57379651a58a84337308ab61d09f83ee6cc09c0a113605d |
| hovercard-subject-tag | pull_request:3798126172 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/python/cpython/pull/150883/files |
| twitter:image | https://avatars.githubusercontent.com/u/690238?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/690238?s=400&v=4 |
| og:image:alt | shutil._ensure_directory() arrived in #8295 with shutil.unpack_archive(), where it created the parent directory of each extracted member. The ZIP path-traversal fix in gh-146581 (GH-146591) reworke... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 96d96c6ad1e3234907759a5e634942d2ca0aded8a6ec1693a59d0f2c59c0dac9 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ec50befe6b611eee09bfe878347d87b8d5d2443f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width