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 more deprecated importlib APIs from Python 3.12 · Issue #98040 · python/cpython

Remove more deprecated importlib APIs from Python 3.12 #98040

New issue
Copy link
New issue
Copy link
Closed
Closed
Remove more deprecated importlib APIs from Python 3.12#98040
Copy link
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@warsaw
warsaw
opened on Oct 7, 2022
Issue body actions

Issue #97850 is the meta issue tracking removals of long deprecated functions from importlib. This ticket tracks just the removals of the following previously deprecated APIs:

  • find_loader()
  • find_module()
  • imp module
  • importlib.abc.Finder
  • pkgutil.ImpImporter
  • pkgutil.ImpLoader
  • @brettcannon @ericsnowcurrently

Linked PRs

  • gh-98040: Remove just the imp module #98573
  • gh-98040: Move the Single-Phase Init Tests Out of test_imp #102561
  • gh-98040: Remove find_loader, find_module and other deprecated APIs #98059
  • GH-98040: Suppress cross-references to the removed imp module #104131
  • gh-98040: Fix importbench: use types.ModuleType() #105743
  • [3.12] gh-98040: Fix importbench: use types.ModuleType() (GH-105743) #105754
Reacted by eli

Activity

Next
  1. warsaw
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Oct 7, 2022
  2. warsaw commented on Oct 7, 2022

    @warsaw
    warsaw
    on Oct 7, 2022
    MemberAuthor
    More actions

    Questions:

    • importlib.abs.PathEntryFinder has this comment: "We don't define find_spec() here since that would break hasattr checks we do to support backward compatibility." Do we need to define find_spec() in this ABC?
  3. warsaw
    changed the title [-]Remove find_module() and find_loader() from Python 3.12[/-] [+]Remove find_module(), find_loader(), and NullImporter from Python 3.12[/+] on Oct 7, 2022
  4. warsaw
    changed the title [-]Remove find_module(), find_loader(), and NullImporter from Python 3.12[/-] [+]Remove more deprecated importlib APIs from Python 3.12[/+] on Oct 7, 2022
  5. warsaw commented on Oct 9, 2022

    @warsaw
    warsaw
    on Oct 9, 2022
    MemberAuthor
    More actions

    pkgutil.ImpImporter cannot be removed since pip 22.2.2 still uses it. This is also going to keep pkgutil.ImpLoader and the imp module around. I'm going to pause work on this branch until there's a pip upstream resolution.

    Reacted by Eric Snow
  6. warsaw
    added a commit that references this issue on Oct 23, 2022

    pythongh-98040: Remove just the `imp` module

    1c9c352
  7. hugovk commented on Apr 8, 2023

    @hugovk
    hugovk
    on Apr 8, 2023
    Member
    More actions

    Little reminder: we're a month away from the beta freeze to remove these, or to bump removal to 3.13.

  8. warsaw commented on Apr 8, 2023

    @warsaw
    warsaw
    on Apr 8, 2023
    MemberAuthor
    More actions

    My plan is to complete this work at the 2023 PyCon sprints.

    Reacted by Hugo van Kemenade, Eric Snow and Brett Cannon
  9. CAM-Gerlach
    added a commit that references this issue on Apr 11, 2023

    pythongh-98040: Remove just the `imp` module

    44cd65d
  10. ericsnowcurrently
    added a commit that references this issue on Apr 19, 2023

    gh-98040: Move the Single-Phase Init Tests Out of test_imp (gh-102561)

    6be7aee
  11. carljm
    added a commit that references this issue on Apr 20, 2023

    Merge branch 'main' into superopt

    5c0a21c
  12. warsaw
    added a commit that references this issue on Apr 28, 2023

    gh-98040: Remove just the `imp` module (#98573)

    e1f1464
  13. warsaw commented on Apr 29, 2023

    @warsaw
    warsaw
    on Apr 29, 2023
    MemberAuthor
    More actions

    Since the imp module was finally removed, I'm going to close this issue. Please refer back to the #97850 as the meta issue for cleaning up the import system cruft.

  14. warsaw
    closed this as completedon Apr 29, 2023
  15. warsaw
    added a commit that references this issue on May 3, 2023

    gh-98040: Remove find_loader, find_module and other deprecated APIs (#…

    3269978
  16. 21 remaining items

  17. gnossen
    added a commit that references this issue on Sep 6, 2023

    [Test] Do not use importlib find_module API, removed in Python 3.12 (#…

    efc3843
  18. openstack-mirroring
    added 2 commits that reference this issue on Jan 7, 2024

    Replace find_module function

    104cb89

    Update git submodules

    b944a4e
  19. yibe
    added a commit that references this issue on May 10, 2024

    Fix errors with Python 3.12

    a75c3d5
  20. turtlebasket
    added a commit that references this issue on Feb 7, 2025

    bump pre-commit version to work with newer versions of python

    715eafb
  21. rporres
    added 2 commits that reference this issue on Feb 14, 2025

    Fix 3.11.x version in pyproject

    7b88d7c

    Fix 3.11.x version in pyproject (#4870)

    4dd9116
  22. agraul
    added 3 commits that reference this issue on Jun 11, 2025

    Replace TornadoImporter with TornadoFinder

    6873836

    Update TornadoImport for newer Python versions

    b79fc76

    Update TornadoImport for newer Python versions

    9a2922b
  23. agraul
    added 3 commits that reference this issue on Jul 7, 2025

    Update TornadoImport for newer Python versions

    1123751

    Update TornadoImport for newer Python versions

    62a6f80

    Update TornadoImport for newer Python versions

    f91af3a
  24. agraul
    added a commit that references this issue on Sep 4, 2025

    Update TornadoImport for newer Python versions

    0af5cc6
  25. piRGoif
    added a commit that references this issue on Jul 6, 2026

    Fix module 'pkgutil' has no attribute '_get_spec'

    011be94
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

    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    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.