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 — Delay deprecated `zipimport.zipimporter.load_module` removal time to 3.15 · Issue #125746 · python/cpython

Delay deprecated zipimport.zipimporter.load_module removal time to 3.15 #125746

New issue
Copy link
New issue
Copy link
Closed
Closed
Delay deprecated zipimport.zipimporter.load_module removal time to 3.15#125746
Copy link
Assignees
brettcannonwarsaw
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

Description

@Wulian233
Wulian233
opened on Oct 20, 2024
Issue body actions

Feature or enhancement

Proposal:

This method have been deprecated since Python 3.10
At https://github.com/python/cpython/blob/main/Lib/zipimport.py#L224-L225

msg = ("zipimport.zipimporter.load_module() is deprecated and slated for "
               "removal in Python 3.12; use exec_module() instead")

edit: Delay the removal time to 3.15
#125746 (comment)

Linked PRs

  • gh-125746: Delay deprecated zipimport.zipimporter.load_module removal time to 3.15 #125748

Activity

  1. Wulian233
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Oct 20, 2024
  2. Damien-Chen commented on Oct 20, 2024

    @Damien-Chen
    Damien-Chen
    on Oct 20, 2024
    Contributor
    More actions

    Could I take this one ?

  3. Wulian233 commented on Oct 20, 2024

    @Wulian233
    Wulian233
    on Oct 20, 2024
    ContributorAuthor
    More actions

    Could I take this one ?

    I've finish the PR

  4. ZeroIntensity commented on Oct 20, 2024

    @ZeroIntensity
    ZeroIntensity
    on Oct 20, 2024
    Member
    More actions

    I would like to hold off on this change for one more version. A quick GitHub search shows that 1.8k projects are still relying on load_module (and my regular expression isn't perfect, so I'm certain that we're missing some).

    The new zipimport methods (I'm using "new" loosely here, I'm talking about the 3.10 methods) were only added to typeshed in late June, so I would assume that many were intentionally using load_module over exec_module, because their IDE was telling them that it doesn't exist (to confirm that, adjusting my GitHub search shows that only 250 projects are using exec_module). Similarly, load_module isn't marked as @deprecated on typeshed, so when we did add it, it's unlikely that people realized they needed to migrate.

    Reacted by W. H. Wang
  5. Wulian233
    changed the title [-]Remove deprecated `zipimport.zipimporter.load_module`[/-] [+]Delay deprecated `zipimport.zipimporter.load_module` removal time to 3.15[/+] on Oct 20, 2024
  6. brettcannon commented on Oct 21, 2024

    @brettcannon
    brettcannon
    on Oct 21, 2024
    Member
    More actions

    @warsaw after our discussions at the core dev sprints I assume you're okay shifting this to 3.15 so it's 5 releases past 3.10 when the warning first appeared?

  7. brettcannon
    assigned
    brettcannon
    and
    warsaw
    on Oct 21, 2024
  8. warsaw commented on Oct 21, 2024

    @warsaw
    warsaw
    on Oct 21, 2024
    Member
    More actions

    @warsaw after our discussions at the core dev sprints I assume you're okay shifting this to 3.15 so it's 5 releases past 3.10 when the warning first appeared?

    No objections from me.

  9. picnixz
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Oct 22, 2024
  10. brettcannon
    added a commit that references this issue on Feb 11, 2025

    gh-125746: Delay deprecated `zipimport.zipimporter.load_module` remov…

    06ac157
  11. brettcannon
    closed this as completedon Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @brettcannon
    brettcannon
  • @warsaw
    warsaw

Labels

stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

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.