-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-133656: Remove deprecated zipimport.zipimporter.load_module
#133662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
considering how pyhton imports work, You might have to modify the files that run on import or any references to load_module. This will be a really daunting task for you :( sorry! |
|
@Wulian233 Will review tmrw |
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.
This PR seems sound, however I'll approve it after stanfromireland and hugovk resolve their conversation, because I am not sure either if it should or shouldn't be in the devguide either :)
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.
There is some additional sys.path manipulation added to the test case that doesn't look like it should be necessary.
Otherwise this looks good to me.
|
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 |
That's necessary. If these two lines are removed, the test will fail (p1) with a And https://github.com/Wulian233/cpython/blob/5616e27403799b481f44f96c3a21336fd03941c9/Lib/test/test_zipimport.py#L165 https://github.com/Wulian233/cpython/blob/5616e27403799b481f44f96c3a21336fd03941c9/Lib/test/test_zipimport.py#L420-L422 |
|
@Wulian233 You're right, the Given that, it makes sense to keep the path manipulation additions, but move them as far down in their respective test cases as possible to still let the everything pass (which should be just before the |
|
I have made the requested changes; please review again thanks! |
|
Thanks for making the requested changes! @ncoghlan: please review the changes made to this pull request. |
|
pythonGH-133662) Remove deprecated `zipimport.zipimporter.load_module`.



Ready review!
zipimport.zipimporter.load_module#133656📚 Documentation preview 📚: https://cpython-previews--133662.org.readthedocs.build/