Skip to content

gh-151866: Remove unneeded zlib dependency in zipfile tests#135631

Merged
StanFromIreland merged 4 commits into
python:mainfrom
danny0838:fix-unneeded-zlib
Jun 22, 2026
Merged

gh-151866: Remove unneeded zlib dependency in zipfile tests#135631
StanFromIreland merged 4 commits into
python:mainfrom
danny0838:fix-unneeded-zlib

Conversation

@danny0838

@danny0838 danny0838 commented Jun 17, 2025

Copy link
Copy Markdown
Contributor

Use zipfile.crc32 rather than zlib.crc32 since it can work without zlib.

@bedevere-app bedevere-app Bot added awaiting review tests Tests in the Lib/test dir labels Jun 17, 2025
@bedevere-app

This comment was marked as resolved.

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 26, 2026
`zipfile.crc32` is internally `zlib.crc32` and fallbacks
to `binacsii.crc32` when `zlib.crc32` is not available.
Both of them do the same task.

`create_zipfile_with_extra_data` only calls `crc32` and
does not actually require the decompression method provided
by `zlib`.  Use `zipfile.crc32` rather than `zlib.crc32` to
allow the test to run on platforms without `zlib` support.
@danny0838 danny0838 force-pushed the fix-unneeded-zlib branch from 788a6bd to e1f43de Compare June 21, 2026 17:29
Comment thread Misc/NEWS.d/next/Tests/2026-06-21-17-28-00.gh-issue-151866.i3ZXyd.rst Outdated
@StanFromIreland StanFromIreland changed the title Remove unneeded zlib dependency in zipfile tests gh-151866: Remove unneeded zlib dependency in zipfile tests Jun 21, 2026
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Jun 22, 2026

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StanFromIreland

Copy link
Copy Markdown
Member

Looks like I'm playing the TSan CI lotto today :'-(

@StanFromIreland StanFromIreland merged commit f928475 into python:main Jun 22, 2026
87 of 89 checks passed
@StanFromIreland

Copy link
Copy Markdown
Member

Merged, thanks.

@danny0838 danny0838 deleted the fix-unneeded-zlib branch June 22, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants