| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
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.
That's necessary. If these two lines are removed, the test will fail (p1) with a ModuleNotFoundError because the modules cannot be found. If they are added back, the test passes. We need to make sure Python can find them, which maybe is the negative effect of removing load_module? I'm not an expert for this, and I don't know the underlying reasons for them, sorry And sys.path.insert is also used in many other places in this file, for example: 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 |
Sorry, something went wrong.
|
@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). |
Sorry, something went wrong.
|
I have made the requested changes; please review again thanks! |
Sorry, something went wrong.
|
Thanks for making the requested changes! @ncoghlan: please review the changes made to this pull request. |
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot ARM64 Raspbian 3.x (tier-3) has failed when building commit 5c6937a. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/#/builders/1678/builds/742 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (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.
pythonGH-133662) Remove deprecated `zipimport.zipimporter.load_module`.
| Back | FazBrowse Home | New Git URL |
Ready review!
📚 Documentation preview 📚: https://cpython-previews--133662.org.readthedocs.build/