Issue 19749: test_venv failure on AIX: 'module' object has no attribute 'O_NOFOLLOW' (original) (raw)

os.open(path, os.O_RDONLY | os.O_NOFOLLOW) fails on AIX:

https://github.com/pypa/pip/blob/develop/pip/locations.py#L70

http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/1138/steps/test/logs/stdio

[120/387/3] test_venv test_defaults (test.test_venv.BasicTest) ... ok test_executable (test.test_venv.BasicTest) ... ok test_executable_symlinks (test.test_venv.BasicTest) ... ok test_isolation (test.test_venv.BasicTest) ... ok test_overwrite_existing (test.test_venv.BasicTest) ... ok test_prefixes (test.test_venv.BasicTest) ... ok test_symlinking (test.test_venv.BasicTest) ... ok test_unoverwritable_fails (test.test_venv.BasicTest) ... ok test_upgrade (test.test_venv.BasicTest) ... ok test_explicit_no_pip (test.test_venv.EnsurePipTest) ... ok test_no_pip_by_default (test.test_venv.EnsurePipTest) ... ok test_with_pip (test.test_venv.EnsurePipTest) ... FAIL

====================================================================== FAIL: test_with_pip (test.test_venv.EnsurePipTest)

Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_venv.py", line 299, in test_with_pip self.run_with_capture(venv.create, self.env_dir, with_pip=True) subprocess.CalledProcessError: Command '['/tmp/tmpu7qsi1xa/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_venv.py", line 305, in test_with_pip self.fail(msg) AssertionError: Command '['/tmp/tmpu7qsi1xa/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1

Subprocess Output Traceback (most recent call last): File "/tmp/tmpch6gt1sg/pip-1.5.rc1-py2.py3-none-any.whl/pip/locations.py", line 65, in _get_build_prefix FileExistsError: [Errno 17] File exists: '/tmp/pip_build_shager'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/runpy.py", line 160, in _run_module_as_main "main", fname, loader, pkg_name) File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/runpy.py", line 73, in _run_code exec(code, run_globals) File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/ensurepip/main.py", line 66, in main() File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/ensurepip/main.py", line 61, in main default_pip=args.default_pip, File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/ensurepip/init.py", line 92, in bootstrap _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/ensurepip/init.py", line 28, in _run_pip import pip File "", line 2147, in _find_and_load File "", line 2136, in _find_and_load_unlocked File "", line 1178, in _load_unlocked File "", line 1140, in _load_backward_compatible File "/tmp/tmpch6gt1sg/pip-1.5.rc1-py2.py3-none-any.whl/pip/init.py", line 10, in File "", line 2147, in _find_and_load File "", line 2136, in _find_and_load_unlocked File "", line 1178, in _load_unlocked File "", line 1140, in _load_backward_compatible File "/tmp/tmpch6gt1sg/pip-1.5.rc1-py2.py3-none-any.whl/pip/util.py", line 15, in File "", line 2147, in _find_and_load File "", line 2136, in _find_and_load_unlocked File "", line 1178, in _load_unlocked File "", line 1140, in _load_backward_compatible File "/tmp/tmpch6gt1sg/pip-1.5.rc1-py2.py3-none-any.whl/pip/locations.py", line 91, in File "/tmp/tmpch6gt1sg/pip-1.5.rc1-py2.py3-none-any.whl/pip/locations.py", line 70, in _get_build_prefix AttributeError: 'module' object has no attribute 'O_NOFOLLOW'