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 fails if zlib is not available
Type: Stage: resolved
Components: Tests Versions: Python 3.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: test_venv failed when the zlib module is not available
View: 31999
Assigned To: Nosy List: vinay.sajip, vstinner
Priority: normal Keywords:

Created on 2017-11-17 14:46 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg306442 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-17 14:46
test_venv should skip test_with_pip() test when the zlib module is missing.

x86-64 Sierra 3.6 failure:
http://buildbot.python.org/all/#/builders/20/builds/62

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

======================================================================
FAIL: test_with_pip (test.test_venv.EnsurePipTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/test/test_venv.py", line 368, in do_test_with_pip
    with_pip=True)
  File "/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/test/test_venv.py", line 61, in run_with_capture
    func(*args, **kwargs)
subprocess.CalledProcessError: Command '['/private/var/folders/sy/9hwmqyx14s11577cvgzwf2v40000gt/T/tmpzg_lamk1/bin/python.exe', '-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 "/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/test/test_venv.py", line 428, in test_with_pip
    self.do_test_with_pip(False)
  File "/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/test/test_venv.py", line 374, in do_test_with_pip
    self.fail(msg.format(exc, details))
AssertionError: Command '['/private/var/folders/sy/9hwmqyx14s11577cvgzwf2v40000gt/T/tmpzg_lamk1/bin/python.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

**Subprocess Output**
Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/ensurepip/__main__.py", line 5, in <module>
    sys.exit(ensurepip._main())
  File "/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/ensurepip/__init__.py", line 204, in _main
    default_pip=args.default_pip,
  File "/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/ensurepip/__init__.py", line 117, in _bootstrap
    return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/ensurepip/__init__.py", line 27, in _run_pip
    import pip
zipimport.ZipImportError: can't decompress data; zlib not available
msg306444 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-17 14:50
Oh, Serhiy already fixed it: bpo-31999.
History
Date User Action Args
2022-04-11 14:58:54adminsetgithub: 76243
2017-11-17 14:50:55vstinnersetstatus: open -> closed
superseder: test_venv failed when the zlib module is not available
messages: + msg306444

resolution: duplicate
stage: resolved
2017-11-17 14:46:32vstinnercreate