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 — gh-125746: Delay deprecated `zipimport.zipimporter.load_module` removal time to 3.15 by Wulian233 · Pull Request #125748 · python/cpython

Conversation

@Wulian233

@Wulian233 Wulian233 commented Oct 20, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

#125746 (comment)

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.

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

📚 Documentation preview 📚: https://cpython-previews--125748.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Wulian233
Wulian233 requested review from brettcannon, ericsnowcurrently, ncoghlan and warsaw as code owners October 20, 2024 05:03
@bedevere-app bedevere-app Bot mentioned this pull request Oct 20, 2024
Delay deprecated zipimport.zipimporter.load_module removal time to 3.15 #125746
Closed
@bedevere-app bedevere-app Bot added the awaiting review label Oct 20, 2024
@rruuaanng

rruuaanng commented Oct 20, 2024

Copy link
Copy Markdown
Contributor

I also encountered this problem, but I don't know why it happened. I opened an issue.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ZeroIntensity
ZeroIntensity requested changes Oct 20, 2024
View reviewed changes

@ZeroIntensity ZeroIntensity left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to postpone this until 3.15. Please update the PR to move the load_module deprecation to pending-removal-in-3.15

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Oct 20, 2024
@Wulian233 Wulian233 changed the title gh-125746: Remove deprecated zipimport.zipimporter.load_module gh-125746: Delay deprecated zipimport.zipimporter.load_module removal time to 3.15 Oct 20, 2024
@Wulian233

Wulian233 commented Oct 20, 2024

Copy link
Copy Markdown
Contributor Author

You're right, when I did this pr, my vscode (the latest Python extension) didn't prompt exec_module either. I will edit the pending-removal-in-3.15.rst and Lib/zipimport.py to remove the entries for pending-removal-in-future.rst

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Wulian233 Wulian233 closed this Oct 21, 2024
@Wulian233
Wulian233 force-pushed the zipimport branch from da920ec to e924bb6 Compare October 21, 2024 11:42
@Wulian233
Delay deprecated
975b325
@Wulian233 Wulian233 reopened this Oct 21, 2024
ZeroIntensity
ZeroIntensity approved these changes Oct 21, 2024
View reviewed changes

@ZeroIntensity ZeroIntensity left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! LGTM.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
brettcannon
brettcannon requested changes Oct 21, 2024
View reviewed changes
Comment thread Lib/zipimport.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting changes and removed awaiting core review labels Oct 21, 2024
@bedevere-app

bedevere-app Bot commented Oct 21, 2024

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Wulian233 added 2 commits October 22, 2024 06:41
@Wulian233
warnings
dd4d06e
@Wulian233
typo
f7bea5d
@bedevere-app bedevere-app Bot added awaiting change review and removed awaiting changes labels Oct 21, 2024
@bedevere-app

bedevere-app Bot commented Oct 21, 2024

Copy link
Copy Markdown

Thanks for making the requested changes!

@brettcannon: please review the changes made to this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app
bedevere-app Bot requested a review from brettcannon October 21, 2024 22:54
@Wulian233
Merge branch 'python:main' into zipimport
0c39304
brettcannon
brettcannon approved these changes Oct 22, 2024
View reviewed changes
@bedevere-app bedevere-app Bot removed the awaiting change review label Oct 22, 2024
@bedevere-app bedevere-app Bot added the awaiting merge label Oct 22, 2024
@brettcannon
Merge branch 'main' into zipimport
9947c70
brettcannon
brettcannon approved these changes Oct 22, 2024
View reviewed changes
Comment thread Doc/deprecations/pending-removal-in-3.15.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Wulian233 @brettcannon
Update Doc/deprecations/pending-removal-in-3.15.rst
cfd1976
Co-authored-by: Brett Cannon <[email protected]>
@Wulian233 Wulian233 mentioned this pull request Nov 10, 2024
Postpone module.__loader__ deprecation to Python 3.16 #126482
Merged
picnixz
picnixz reviewed Nov 10, 2024
View reviewed changes

@picnixz picnixz left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check if there is a deprecated-removed directive to update in the corresponding docs entry?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/deprecations/pending-removal-in-3.15.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/zipimport.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/zipimport.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Misc/NEWS.d/next/Library/2024-10-20-13-01-05.gh-issue-125746.wDLTay.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Wulian233
Apply picnixz suggesions
7c36afa
@Wulian233

Wulian233 commented Nov 17, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@brettcannon Friendly ping:) maybe we can merge this? It should be fine now, thank you!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rruuaanng

rruuaanng commented Nov 17, 2024

Copy link
Copy Markdown
Contributor

@Wulian233 Be patient, everyone has their own job :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ZeroIntensity

ZeroIntensity commented Nov 17, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Eh, IMO it's fine to remind someone to merge if the PR hasn't had any additional reviewers.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Wulian233

Wulian233 commented Feb 11, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

A few months later: A similar PR for the delayed removal of load_module in importlib #129855 was just merged and backported. Is this PR still needed?

cc @brettcannon

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tomasr8

tomasr8 commented Feb 11, 2025

Copy link
Copy Markdown
Member

Is this PR still needed?

It is, this one updates zipimport, while the other one was for importlib.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

brettcannon
brettcannon approved these changes Feb 11, 2025
View reviewed changes
@brettcannon
Merge branch 'main' into zipimport
f3367d8
@brettcannon
brettcannon enabled auto-merge (squash) February 11, 2025 23:46
@brettcannon
brettcannon merged commit 06ac157 into python:main Feb 11, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Feb 11, 2025
@brettcannon

brettcannon commented Feb 12, 2025

Copy link
Copy Markdown
Member

Sorry for the delay! Got swamped and this fell off my radar thinking I was waiting on something for the PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Wulian233
Wulian233 deleted the zipimport branch February 12, 2025 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@picnixz picnixz picnixz left review comments
@brettcannon brettcannon brettcannon approved these changes
@ZeroIntensity ZeroIntensity ZeroIntensity approved these changes
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@ncoghlan ncoghlan Awaiting requested review from ncoghlan ncoghlan is a code owner
@warsaw warsaw Awaiting requested review from warsaw warsaw is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@Wulian233 @rruuaanng @ZeroIntensity @tomasr8 @brettcannon @picnixz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.