FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-26131: deprecate the use of load_module() by brettcannon · Pull Request #22905 · python/cpython · GitHub

Repository navigation

bpo-26131: deprecate the use of load_module() - #22905

Closed
brettcannon wants to merge 4 commits into
python:masterfrom
brettcannon:deprecate-load_module
Closed

brettcannon wants to merge 4 commits into
python:masterfrom
brettcannon:deprecate-load_module

Conversation

brettcannon commented Oct 23, 2020 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Deprecating the use of load_module() requires two parts:

  1. The actual load_module() implementations are deprecated.
  2. Use of load_module() as a fallback for exec_module() trigger an ImportWarning.

This makes sure that either direct use of the method or indirect use by the import system raises some warning.

The method itself has been documented as deprecated since Python 3.6 and has been superceded by exec_module().

https://bugs.python.org/issue26131

warsaw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

One suggestion. There are also test failures.

Comment thread Lib/importlib/_bootstrap.py Outdated

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again

Copy link
Copy Markdown

Thanks for making the requested changes!

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

bedevere-bot requested a review from warsaw October 23, 2020 18:14

Copy link
Copy Markdown
Member Author

This is going to require implementing exec_module() for zipimport.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL