stan@stanlaptop:~/dev/cpython{issue-152391}$ rm Modules/_interpreters.cpython-316d-x86_64-linux-gnu.so
stan@stanlaptop:~/dev/cpython{issue-152391}$ ./python -c "import _interpreters"
Traceback (most recent call last):
File "<string>", line 1, in <module>
import _interpreters
ModuleNotFoundError: Standard library module '_interpreters' was not found
stan@stanlaptop:~/dev/cpython{issue-152391}$ ./python -m test test_interpreters
Using random seed: 134531407
0:00:00 load avg: 0.87 mem: 50.5 MiB Run 1 test sequentially in a single process
0:00:00 load avg: 0.87 mem: 50.5 MiB [1/1] test_interpreters
Failed to import test module: test.test_interpreters.test_channels
Traceback (most recent call last):
File "/home/stan/dev/cpython/Lib/unittest/loader.py", line 433, in _find_test_path
module = self._get_module_from_name(name)
File "/home/stan/dev/cpython/Lib/unittest/loader.py", line 374, in _get_module_from_name
__import__(name)
~~~~~~~~~~^^^^^^
File "/home/stan/dev/cpython/Lib/test/test_interpreters/test_channels.py", line 11, in <module>
from concurrent import interpreters
File "/home/stan/dev/cpython/Lib/concurrent/interpreters/__init__.py", line 5, in <module>
import _interpreters
ModuleNotFoundError: Standard library module '_interpreters' was not found
Failed to import test module: test.test_interpreters.test_queues
Traceback (most recent call last):
File "/home/stan/dev/cpython/Lib/unittest/loader.py", line 433, in _find_test_path
module = self._get_module_from_name(name)
File "/home/stan/dev/cpython/Lib/unittest/loader.py", line 374, in _get_module_from_name
__import__(name)
~~~~~~~~~~^^^^^^
File "/home/stan/dev/cpython/Lib/test/test_interpreters/test_queues.py", line 10, in <module>
from concurrent import interpreters
File "/home/stan/dev/cpython/Lib/concurrent/interpreters/__init__.py", line 5, in <module>
import _interpreters
ModuleNotFoundError: Standard library module '_interpreters' was not found
Failed to import test module: test.test_interpreters.test_stress
Traceback (most recent call last):
File "/home/stan/dev/cpython/Lib/unittest/loader.py", line 433, in _find_test_path
module = self._get_module_from_name(name)
File "/home/stan/dev/cpython/Lib/unittest/loader.py", line 374, in _get_module_from_name
__import__(name)
~~~~~~~~~~^^^^^^
File "/home/stan/dev/cpython/Lib/test/test_interpreters/test_stress.py", line 7, in <module>
from concurrent import interpreters
File "/home/stan/dev/cpython/Lib/concurrent/interpreters/__init__.py", line 5, in <module>
import _interpreters
ModuleNotFoundError: Standard library module '_interpreters' was not found
test test_interpreters crashed -- Traceback (most recent call last):
File "/home/stan/dev/cpython/Lib/test/libregrtest/single.py", line 210, in _runtest_env_changed_exc
_load_run_test(result, runtests)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/home/stan/dev/cpython/Lib/test/libregrtest/single.py", line 165, in _load_run_test
regrtest_runner(result, test_func, runtests)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/stan/dev/cpython/Lib/test/libregrtest/single.py", line 118, in regrtest_runner
test_result = test_func()
File "/home/stan/dev/cpython/Lib/test/libregrtest/single.py", line 162, in test_func
return run_unittest(test_mod, runtests)
File "/home/stan/dev/cpython/Lib/test/libregrtest/single.py", line 38, in run_unittest
raise Exception("errors while loading tests")
Exception: errors while loading tests
0:00:00 load avg: 0.87 mem: 52.5 MiB [1/1/1] test_interpreters failed (uncaught exception)
== Tests result: FAILURE ==
1 test failed:
test_interpreters
Total duration: 506 ms
Total tests: run=0
Total test files: run=1/1 failed=1
Result: FAILURE
This doesn’t work, this imports
_interpreters, the above was a skip.Originally posted by @StanFromIreland in #152396 (comment)