Title: Remove private stdlib helpers orphaned by past removals · Issue #150882 · python/cpython · GitHub
Open Graph Title: Remove private stdlib helpers orphaned by past removals · Issue #150882 · python/cpython
X Title: Remove private stdlib helpers orphaned by past removals · Issue #150882 · python/cpython
Description: Bug report / cleanup Two private helpers lost their last caller when a feature was removed and now sit unused. A word-boundary search across Lib, Modules, Python, Objects, and Include finds no reference to either outside its own definiti...
Open Graph Description: Bug report / cleanup Two private helpers lost their last caller when a feature was removed and now sit unused. A word-boundary search across Lib, Modules, Python, Objects, and Include finds no refe...
X Description: Bug report / cleanup Two private helpers lost their last caller when a feature was removed and now sit unused. A word-boundary search across Lib, Modules, Python, Objects, and Include finds no refe...
Opengraph URL: https://github.com/python/cpython/issues/150882
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Remove private stdlib helpers orphaned by past removals","articleBody":"# Bug report / cleanup\n\nTwo private helpers lost their last caller when a feature was removed and now sit unused. A word-boundary search across `Lib`, `Modules`, `Python`, `Objects`, and `Include` finds no reference to either outside its own definition, and a GitHub code search finds no downstream importer.\n\n## `shutil._ensure_directory(path)`\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\n## `importlib._bootstrap._object_name(obj)`\n\n- GH-23469 (bpo-26131) added it to render an object's qualified name inside the `load_module()` deprecation warnings.\n- GH-97850 (gh-142205) removed `load_module()` and its warnings, deleting the last call site.\n\nI will open one PR per module. Both removals keep the existing test suites green (`test_shutil`, `test_importlib`).\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-150883\n* gh-150884\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/gaborbernat","@type":"Person","name":"gaborbernat"},"datePublished":"2026-06-03T19:40:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/150882/cpython/issues/150882"}
| 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:ed81f540-598a-2d1f-0277-0334d46b1166 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BA1A:3DA7AC:60E946:8415CA:6A55A1DA |
| html-safe-nonce | 404aecfd2379561ce5b4ba66359a36e44500fc42672df0d3cd8218734d19caa2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTFBOjNEQTdBQzo2MEU5NDY6ODQxNUNBOjZBNTVBMURBIiwidmlzaXRvcl9pZCI6Ijc2NTYwMzY4NTc2OTcxMTY2MzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d13d9b30a0c58a30422a097723f631169e6a7cd6c9f4aa78d6e5f0c4e7346bd3 |
| hovercard-subject-tag | issue:4583078123 |
| 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/150882/issue_layout |
| twitter:image | https://opengraph.githubassets.com/545f821cd174b507785fc6cdb956e880962c0bc927d71017d340b44e1b19deea/python/cpython/issues/150882 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/545f821cd174b507785fc6cdb956e880962c0bc927d71017d340b44e1b19deea/python/cpython/issues/150882 |
| og:image:alt | Bug report / cleanup Two private helpers lost their last caller when a feature was removed and now sit unused. A word-boundary search across Lib, Modules, Python, Objects, and Include finds no refe... |
| 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 | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| 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 | 653fccf1e27344851c0d3de3fa6faa526197f072 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width