GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove private stdlib helpers orphaned by past removals · Issue #150882 · python/cpython

Remove private stdlib helpers orphaned by past removals #150882

New issue
Copy link
New issue
Copy link
Closed
Closed
Remove private stdlib helpers orphaned by past removals#150882
Copy link

Description

@gaborbernat
gaborbernat
opened on Jun 3, 2026
Issue body actions

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 definition, and a GitHub code search finds no downstream importer.

shutil._ensure_directory(path)

  • [3.6] bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261) #8295 added it with shutil.unpack_archive() to create the parent directory of each extracted member.
  • gh-146581: Fix vulnerability in shutil.unpack_archive() for ZIP files on Windows #146591 (shutil.unpack_archive() on Windows writes outside extract_dir for ZIP entries with drive-prefixed names #146581), the ZIP path-traversal fix, reworked _unpack_zipfile() to create directories inline and deleted the last _ensure_directory(targetpath) call.

importlib._bootstrap._object_name(obj)

  • gh-70319: Deprecate usage of load_module() #23469 (bpo-26131) added it to render an object's qualified name inside the load_module() deprecation warnings.
  • Meta issue for cleaning up import system cruft #97850 (GH-97850: Remove all uses and definitions of load_module() from importlib #142205) removed load_module() and its warnings, deleting the last call site.

I will open one PR per module. Both removals keep the existing test suites green (test_shutil, test_importlib).

Linked PRs

  • gh-150885: Remove unused shutil._ensure_directory #150883
  • gh-150886: Remove unused importlib._bootstrap._object_name #150884

Activity

  1. gaborbernat
    added 2 commits that reference this issue on Jun 3, 2026

    pythongh-150882: Remove unused importlib._bootstrap._object_name

    ab23622

    pythongh-150882: Remove unused shutil._ensure_directory

    448cb74
  2. gaborbernat commented on Jun 3, 2026

    @gaborbernat
    gaborbernat
    on Jun 3, 2026
    ContributorAuthor
    More actions

    Superseded by one issue per topic: #150885 (shutil._ensure_directory) and #150886 (importlib._bootstrap._object_name). Closing this combined issue.

  3. gaborbernat
    closed this as completedon Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.