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 — bpo-42131: Add PEP 451-related methods to zipimport by brettcannon · Pull Request #23187 · python/cpython

Conversation

@brettcannon

@brettcannon brettcannon commented Nov 7, 2020 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

https://bugs.python.org/issue42131

Sorry, something went wrong.

Uh oh!

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

All reactions
@brettcannon
bpo-42131: Add PEP 451-related methods to zipimport
28e1a27
@brettcannon
brettcannon requested a review from serhiy-storchaka November 7, 2020 02:40
@brettcannon
brettcannon requested review from encukou, ericsnowcurrently, ncoghlan and warsaw as code owners November 7, 2020 02:40
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Nov 7, 2020
@bedevere-bot bedevere-bot added the awaiting core review label Nov 7, 2020
serhiy-storchaka
serhiy-storchaka reviewed Nov 7, 2020
View reviewed changes

@serhiy-storchaka serhiy-storchaka 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 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.

All reactions
ncoghlan
ncoghlan approved these changes Nov 7, 2020
View reviewed changes

@ncoghlan ncoghlan left a comment

Copy link
Copy Markdown
Contributor

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.

All reactions
Comment thread Doc/library/zipimport.rst Resolved

Uh oh!

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

Comment thread Doc/library/zipimport.rst Resolved

Uh oh!

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

Comment thread Lib/test/test_zipimport.py Resolved

Uh oh!

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

@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Nov 7, 2020
@brettcannon @ncoghlan
Update Doc/library/zipimport.rst
73091d4
Co-authored-by: Nick Coghlan <[email protected]>
@brettcannon

brettcannon commented Nov 7, 2020

Copy link
Copy Markdown
Member Author

@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.

All reactions

Sorry, something went wrong.

Uh oh!

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

brettcannon added 4 commits November 13, 2020 13:39
@brettcannon
Merge remote-tracking branch 'origin/master' into zipimport-spec
cfaabfb
@brettcannon
Merge branch 'zipimport-spec' of github.com:brettcannon/cpython into …
1a24684
…zipimport-spec
@brettcannon
Add a reference to importlib
7b4ade4
@brettcannon
Update assertion methods
161e95b
@brettcannon
brettcannon merged commit d2e94bb into python:master Nov 13, 2020
@brettcannon
brettcannon deleted the zipimport-spec branch November 13, 2020 23:14
@bedevere-bot bedevere-bot removed the awaiting merge label Nov 13, 2020
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
@brettcannon @ncoghlan @adorilson
bpo-42131: Add PEP 451-related methods to zipimport (pythonGH-23187)
ffc034e
Specifically, find_spec(), create_module(), and exec_module().

Co-authored-by: Nick Coghlan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka left review comments
@ncoghlan ncoghlan ncoghlan approved these changes
@encukou encukou Awaiting requested review from encukou
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently
@warsaw warsaw Awaiting requested review from warsaw

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.

5 participants

@brettcannon @ncoghlan @serhiy-storchaka @the-knights-who-say-ni @bedevere-bot
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.