GeezerVison is showing github.com — gh-133656: Remove deprecated `zipimport.zipimporter.load_module` by Wulian233 · Pull Request #133662 · python/cpython
Conversation
Wulian233
commented
May 8, 2025
•
edited
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.
|
@Wulian233
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!
|
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
sharktide
left a comment
•
edited
Loading
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.
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 :)
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.
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.
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.
|
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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Wulian233
commented
Aug 3, 2025
•
edited
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.
|
@Wulian233 You're right, the importlib.import_module lines were previously only passing because the prior zi.load_module call had left sys.modules["TESTPACK"] populated.
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 importlib.import_module line in each case, since the direct instantiation shouldn't care if the zip archive is on sys.path or not, while importlib.import_module does care).
|
gpshead reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I have made the requested changes; please review again
thanks!
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks for making the requested changes!
@ncoghlan: please review the changes made to this pull request.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot ARM64 Raspbian 3.x (tier-3) has failed when building commit 5c6937a.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1678/builds/742) and take a look at the build logs.
- Check if the failure is related to this commit (5c6937a) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1678/builds/742
Failed tests:
- test.test_multiprocessing_fork.test_processes
Failed subtests:
- test_interrupt - test.test_multiprocessing_fork.test_processes.WithProcessesTestProcess.test_interrupt
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/contextlib.py", line 85, in inner
return func(*args, **kwds)
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/test/_test_multiprocessing.py", line 596, in test_interrupt
exitcode = self._kill_process(multiprocessing.Process.interrupt)
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/contextlib.py", line 85, in inner
return func(*args, **kwds)
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/test/_test_multiprocessing.py", line 577, in _kill_process
self.assertEqual(join(), None)
~~~~^^
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/test/_test_multiprocessing.py", line 250, in __call__
return self.func(*args, **kwds)
~~~~~~~~~^^^^^^^^^^^^^^^
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/multiprocessing/process.py", line 156, in join
res = self._popen.wait(timeout)
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/multiprocessing/popen_fork.py", line 44, in wait
return self.poll(os.WNOHANG if timeout == 0.0 else 0)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/multiprocessing/popen_fork.py", line 28, in poll
pid, sts = os.waitpid(self.pid, flag)
~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/test/_test_multiprocessing.py", line 573, in handler
raise RuntimeError('join took too long: %s' % p)
RuntimeError: join took too long: <Process name='Process-1' pid=226230 parent=226228 started daemon>
Traceback (most recent call last):
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/contextlib.py", line 85, in inner
return func(*args, **kwds)
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/test/_test_multiprocessing.py", line 596, in test_interrupt
exitcode = self._kill_process(multiprocessing.Process.interrupt)
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/contextlib.py", line 85, in inner
return func(*args, **kwds)
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/test/_test_multiprocessing.py", line 577, in _kill_process
self.assertEqual(join(), None)
~~~~^^
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/test/_test_multiprocessing.py", line 250, in __call__
return self.func(*args, **kwds)
~~~~~~~~~^^^^^^^^^^^^^^^
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/multiprocessing/process.py", line 156, in join
res = self._popen.wait(timeout)
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/multiprocessing/popen_fork.py", line 44, in wait
return self.poll(os.WNOHANG if timeout == 0.0 else 0)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/multiprocessing/popen_fork.py", line 28, in poll
pid, sts = os.waitpid(self.pid, flag)
~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/home/stan/buildarea/3.x.stan-raspbian.nondebug/build/Lib/test/_test_multiprocessing.py", line 573, in handler
raise RuntimeError('join took too long: %s' % p)
RuntimeError: join took too long: <Process name='Process-151' pid=210285 parent=209827 started daemon>
|
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.
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.
|