GeezerVison is showing github.com — bpo-42131: Add PEP 451-related methods to zipimport by brettcannon · Pull Request #23187 · python/cpython
Conversation
brettcannon
commented
Nov 7, 2020
•
edited by bedevere-bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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 find_loader and load_module be expressed in terms of find_spec?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
LGTM, although I'm also curious as to whether or not the old methods could be redefined in terms of the new one.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
@serhiy-storchaka @ncoghlan the reason I didn't port the old methods over is I'm planning to deprecate them (and all other instances of find_module, find_loader, and load_module in the stdlib). I'm doing this first as I need it to land another PR which makes calling load_module raise an ImportWarning if __spec__.loader doesn't exist (#22905 was my attempt at that, but test_ensurepip of all things kept failing due to runpy importing the zip file). When I submit that PR I will deprecate these old methods in zipimport, and so porting seems unnecessary. It also makes porting to the new methods easier since you won't to contend with your code potentially breaking and having to move to a new API.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
adorilson
pushed a commit
to adorilson/cpython
that referenced
this pull request
Mar 13, 2021
Specifically, find_spec(), create_module(), and exec_module().
Co-authored-by: Nick Coghlan <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
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.
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.
|