GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script fails when running test suite locally without zlib · Issue #91752 · python/cpython

test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script fails when running test suite locally without zlib #91752

New issue
Copy link
New issue
Copy link
Closed
Closed
test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script fails when running test suite locally without zlib#91752
Copy link
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@AbhigyanBose
AbhigyanBose
opened on Apr 20, 2022
Issue body actions

Bug report

When running test suite locally without zlib, test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script fails, expected behavior is for the test to be skipped.

This test is skipped when using a buildbot due to the line:
@support.skip_if_buildbot('not all buildbots have enough space')

Your environment
Fresh install of Ubuntu 20.04 followed up update. Executed the following to install build tools:
sudo apt install build-essential

Command used to run tests:
./python -m test -v test_tools

Error message:

changing mode of /tmp/tmpa7jc0cg_/python-installation/lib/python3.11/lib-dynload/__pycache__ to 755
Traceback (most recent call last):
  File "<frozen zipimport>", line 570, in _get_decompress_func
ModuleNotFoundError: No module named 'zlib'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen zipimport>", line 618, in _get_data
  File "<frozen zipimport>", line 573, in _get_decompress_func
zipimport.ZipImportError: can't decompress data; zlib not available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 6, in <module>
  File "<frozen runpy>", line 207, in run_module
  File "<frozen runpy>", line 148, in _get_module_details
  File "<frozen runpy>", line 112, in _get_module_details
  File "<frozen zipimport>", line 196, in get_code
  File "<frozen zipimport>", line 752, in _get_module_code
  File "<frozen zipimport>", line 620, in _get_data
zipimport.ZipImportError: can't decompress data; zlib not available
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/tmp/tmpa7jc0cg_/cpython/Lib/ensurepip/__main__.py", line 5, in <module>
    sys.exit(ensurepip._main())
             ^^^^^^^^^^^^^^^^^
  File "/tmp/tmpa7jc0cg_/cpython/Lib/ensurepip/__init__.py", line 276, in _main
    return _bootstrap(
           ^^^^^^^^^^^
  File "/tmp/tmpa7jc0cg_/cpython/Lib/ensurepip/__init__.py", line 192, in _bootstrap
    return _run_pip([*args, *_PACKAGE_NAMES], additional_paths)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/tmpa7jc0cg_/cpython/Lib/ensurepip/__init__.py", line 92, in _run_pip
    return subprocess.run([sys.executable, '-W', 'ignore::DeprecationWarning',
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/tmpa7jc0cg_/cpython/Lib/subprocess.py", line 535, in run
    raise CalledProcessError(retcode, process.args,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
subprocess.CalledProcessError: Command '['/tmp/tmpa7jc0cg_/python-build/python', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/tmp/tmpf9yxt3r4/setuptools-58.1.0-py3-none-any.whl\', \'/tmp/tmpf9yxt3r4/pip-22.0.4-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/tmp/tmpf9yxt3r4\', \'--root\', \'/\', \'--upgrade\', \'setuptools\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1.
make: *** [Makefile:1824: install] Error 1

---- END ----
ERROR

some more output in between

test_sundry_windows (test.test_tools.test_sundry.TestSundryScripts.test_sundry_windows) ... skipped 'Windows-only test'

======================================================================
ERROR: test_freeze_simple_script (test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/abhigyan/Documents/cpython/Lib/contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/abhigyan/Documents/cpython/Lib/test/support/os_helper.py", line 396, in temp_dir
    yield path
    ^^^^^^^^^^
  File "/home/abhigyan/Documents/cpython/Lib/test/test_tools/test_freeze.py", line 27, in test_freeze_simple_script
    outdir, scriptfile, python = helper.prepare(script, outdir)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/abhigyan/Documents/cpython/Tools/freeze/test/freeze.py", line 163, in prepare
    _run_quiet([MAKE, '-C', builddir, '-j8', 'install'])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/abhigyan/Documents/cpython/Tools/freeze/test/freeze.py", line 25, in _run_quiet
    return subprocess.run(
           ^^^^^^^^^^^^^^^
  File "/home/abhigyan/Documents/cpython/Lib/subprocess.py", line 535, in run
    raise CalledProcessError(retcode, process.args,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
subprocess.CalledProcessError: Command '['/usr/bin/make', '-C', '/tmp/tmpa7jc0cg_/python-build', '-j8', 'install']' returned non-zero exit status 2.

----------------------------------------------------------------------
Ran 61 tests in 86.200s

FAILED (errors=1, skipped=1)
test_tools failed (1 error) in 1 min 26 sec

== Tests result: FAILURE ==

1 test failed:
    test_tools

Total duration: 1 min 26 sec
Tests result: FAILURE

Complete test output is attached below.

CPython versions tested on:

  • Python 3.11.0a7+
    Operating system and architecture:
    Ubuntu 20.04.4 LTS
    64bit
    test_tools test output.txt

Activity

  1. AbhigyanBose
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Apr 20, 2022
  2. merwok commented on May 3, 2022

    @merwok
    merwok
    on May 3, 2022
    Member
    More actions

    Does this apply to 3.10 and 3.9 too?

  3. gvanrossum
    closed this as completedin 77e7a04on May 3, 2022
  4. serhiy-storchaka
    added a commit that references this issue on Aug 9, 2026

    pythonGH-91752: Skip test_freeze_simple_script when zlib is not avail…

    77e7a04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.