GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — gh-94379: Remove zipimport find_loader() and find_module() methods by vstinner · Pull Request #94380 · python/cpython Conversation
|
|
cc @brettcannon |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The code removal looks fine, but the doc changes left out the removal of load_module() as well.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
When you're done making the requested changes, leave the comment: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@brettcannon: I updated the PR to mention also load_module() removal, and fix test_zipimport... But now, I feel that I removed too many lines in the tests! Maybe the tests should be fixed instead? Problem: I don't know how to fix the packdir2 tests: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
find_spec() only replaces find_loader() and find_module(), so this sentence is a bit misleading. Same is true for the news entry.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why the test removals for lines that don't directly use the associated methods?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
How is it failing? Maybe only do the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Good idea! I modified this PR to only remove find_loader() and find_module() methods: keep load_module() for now (it can be removed in a separated PR). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@brettcannon: Would you mind to review the updated PR? Now it only removes find_loader() and find_module() methods, and it only removes the bare minimum lines in test_zipimport.py. Once the PR gets approved, I will solve the Doc/whatsnew/3.12.rst conflict. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@vstinner LGTM! And an FYI for anyone else who reviews, the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
zipimport: Remove find_loader() and find_module() methods, deprecated in Python 3.10: use the find_spec() method instead. See PEP 451 for the rationale.
|
Thanks for the reviews @warsaw and @brettcannon! It's easier to modify zipimport since @serhiy-storchaka rewrote it in pure Python :-) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.