Skip to content

test_zipapp failed when the zlib module is not available #76179

Description

@serhiy-storchaka
BPO 31998
Nosy @pfmoore, @serhiy-storchaka
PRs
  • bpo-31998: Fix test_zipapp in case the zlib module is not available. #4358
  • 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:

    assignee = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2017-11-10.10:18:29.024>
    created_at = <Date 2017-11-10.09:25:52.915>
    labels = ['3.7', 'type-bug', 'tests']
    title = 'test_zipapp failed when the zlib module is not available'
    updated_at = <Date 2017-11-10.10:18:29.023>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2017-11-10.10:18:29.023>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2017-11-10.10:18:29.024>
    closer = 'serhiy.storchaka'
    components = ['Tests']
    creation = <Date 2017-11-10.09:25:52.915>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31998
    keywords = ['patch']
    message_count = 3.0
    messages = ['306009', '306013', '306015']
    nosy_count = 2.0
    nosy_names = ['paul.moore', 'serhiy.storchaka']
    pr_nums = ['4358']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue31998'
    versions = ['Python 3.7']

    Activity

    1. serhiy-storchaka commented on Nov 10, 2017

      @serhiy-storchaka
      MemberAuthor

      http://buildbot.python.org/all/#/builders/14/builds/160/steps/4/logs/stdio
      ======================================================================
      ERROR: test_create_archive_with_compression (test.test_zipapp.ZipAppTest)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/test_zipapp.py", line 111, in test_create_archive_with_compression
          zipapp.create_archive(source, target, compressed=True)
        File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/zipapp.py", line 138, in create_archive
          with zipfile.ZipFile(fd, 'w', compression=compression) as z:
        File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/zipfile.py", line 1061, in __init__
          _check_compression(compression)
        File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/zipfile.py", line 644, in _check_compression
          "Compression requires the (missing) zlib module")
      RuntimeError: Compression requires the (missing) zlib module

    2. serhiy-storchaka commented on Nov 10, 2017

      @serhiy-storchaka
      MemberAuthor

      New changeset a1718bc by Serhiy Storchaka in branch 'master':
      bpo-31998: Fix test_zipapp in case the zlib module is not available. (bpo-4358)
      a1718bc

    3. pfmoore commented on Nov 10, 2017

      @pfmoore
      Member

      Good catch, thanks Serhiy!

    4. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Labels

    3.7 (EOL)end of lifetestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions