This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_venv failure on AIX: 'module' object has no attribute 'O_NOFOLLOW'
Type: Stage:
Components: Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: David.Edelsohn, Marcus.Smith, christian.heimes, dstufft, larry, loewis, ncoghlan, pitrou, vstinner
Priority: release blocker Keywords:

Created on 2013-11-24 12:40 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (8)
msg204202 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-11-24 12:40
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 <module>
    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 "<frozen importlib._bootstrap>", line 2147, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2136, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1178, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1140, in _load_backward_compatible
  File "/tmp/tmpch6gt1sg/pip-1.5.rc1-py2.py3-none-any.whl/pip/__init__.py", line 10, in <module>
  File "<frozen importlib._bootstrap>", line 2147, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2136, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1178, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1140, in _load_backward_compatible
  File "/tmp/tmpch6gt1sg/pip-1.5.rc1-py2.py3-none-any.whl/pip/util.py", line 15, in <module>
  File "<frozen importlib._bootstrap>", line 2147, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2136, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1178, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1140, in _load_backward_compatible
  File "/tmp/tmpch6gt1sg/pip-1.5.rc1-py2.py3-none-any.whl/pip/locations.py", line 91, in <module>
  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'
msg204210 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-11-24 12:53
Looks like a bug in PIP more than in Python.
msg204212 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2013-11-24 13:23
Yeah, I suspect this is an AIX platform compatibility issue in pip - I
believe our buildbots cover a broader range of platforms than pip's own
automated testing.

Since it's a nominally unstable buildbot and likely an upstream pip issue,
I planned to investigate further after the beta release.

I've also been considering writing up a procedural PEP (separate from PEP
453)  to cover the ongoing maintenance process for the bundled pip, and one
change I'm considering suggesting is that we may want to always upgrade to
the pip release candidates so the full buildbot fleet gets a shot at them
*before* the final upstream release.
msg204214 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-11-24 13:40
https://github.com/pypa/pip/issues/849
https://github.com/pypa/pip/pull/935
msg204215 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2013-11-24 13:48
Bumping for Larry's attention - I don't think this is major enough to block beta 1, but that's his call as RM.
msg204239 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-11-24 17:37
> Looks like a bug in PIP more than in Python.

Correct, but it does impact Python buildbots. I would like to have one issue per buildbot failure. Can someone report the bug upstream please?
msg204284 - (view) Author: Marcus Smith (Marcus.Smith) (Python triager) Date: 2013-11-25 00:04
There's a new PR to fix this in the pip 1.5.X branch: 
https://github.com/pypa/pip/pull/1344
msg207173 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2014-01-02 16:47
test_venv now passes on that buildbot, apparently since PIP 1.5 has fixed the issue, and is now bundled with Python.
History
Date User Action Args
2022-04-11 14:57:54adminsetgithub: 63948
2014-01-02 16:47:45loewissetstatus: open -> closed

nosy: + loewis
messages: + msg207173

resolution: fixed
2013-11-25 00:04:00Marcus.Smithsetnosy: + Marcus.Smith
messages: + msg204284
2013-11-24 17:37:27vstinnersetmessages: + msg204239
2013-11-24 13:48:58ncoghlansetpriority: normal -> release blocker
nosy: + larry
messages: + msg204215

2013-11-24 13:40:32christian.heimessetnosy: + christian.heimes
messages: + msg204214
2013-11-24 13:23:46ncoghlansetmessages: + msg204212
2013-11-24 12:53:41pitrousetnosy: + pitrou, dstufft
messages: + msg204210
2013-11-24 12:40:30vstinnercreate