-
-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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
test_runpy failure #56331
Comments
I get the following failures in a fresh checkout: ====================================================================== Traceback (most recent call last):
File "/home/antoine/t/cpython/Lib/test/test_runpy.py", line 283, in test_explicit_relative_import
self._check_relative_imports(depth)
File "/home/antoine/t/cpython/Lib/test/test_runpy.py", line 257, in _check_relative_imports
make_legacy_pyc(mod_fname)
File "/home/antoine/t/cpython/Lib/test/support.py", line 217, in make_legacy_pyc
os.rename(pyc_file, legacy_pyc)
OSError: [Errno 2] No such file or directory ====================================================================== Traceback (most recent call last):
File "/home/antoine/t/cpython/Lib/test/test_runpy.py", line 288, in test_main_relative_import
self._check_relative_imports(depth, "__main__")
File "/home/antoine/t/cpython/Lib/test/test_runpy.py", line 257, in _check_relative_imports
make_legacy_pyc(mod_fname)
File "/home/antoine/t/cpython/Lib/test/support.py", line 217, in make_legacy_pyc
os.rename(pyc_file, legacy_pyc)
OSError: [Errno 2] No such file or directory ====================================================================== Traceback (most recent call last):
File "/home/antoine/t/cpython/Lib/test/test_runpy.py", line 273, in test_run_module
self._check_module(depth)
File "/home/antoine/t/cpython/Lib/test/test_runpy.py", line 177, in _check_module
make_legacy_pyc(mod_fname)
File "/home/antoine/t/cpython/Lib/test/support.py", line 217, in make_legacy_pyc
os.rename(pyc_file, legacy_pyc)
OSError: [Errno 2] No such file or directory ====================================================================== Traceback (most recent call last):
File "/home/antoine/t/cpython/Lib/test/test_runpy.py", line 278, in test_run_package
self._check_package(depth)
File "/home/antoine/t/cpython/Lib/test/test_runpy.py", line 201, in _check_package
make_legacy_pyc(mod_fname)
File "/home/antoine/t/cpython/Lib/test/support.py", line 217, in make_legacy_pyc
os.rename(pyc_file, legacy_pyc)
OSError: [Errno 2] No such file or directory Here is the test output: test_run_code (test.test_runpy.RunModuleCodeTest) ... ok |
It still works fine for me (as do test_imp, test_import and test_importlib). Did you provide any arguments to ./configure, or provide any interesting options to regrtest to get it to fail? |
Oh, that's the other question - is there any chance you are passing -B or have PYTHONDONTWRITEBYTECODE set? (I'm not sure that would affect make_legacy_pyc, but all the errors you posted relate to unexpectedly absent pyc files and directories) |
Indeed, PYTHONDONTWRITEBYTECODE seems set by default on this Linux install... Ouch. |
Duplicate of bpo-12117. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: