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 — Minor test fixes for zlib and gzip by rhpvorderman · Pull Request #22408 · python/cpython

Conversation

@rhpvorderman

@rhpvorderman rhpvorderman commented Sep 25, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This is very minor so I did not create an issue on bugs.python.org.

I am working on a gzip-compatible library and used the tests from cpython to ensure that it was indeed compatible. I found these minor oversights when testing the library.

  1. a decompressor is finished when it reaches eof. Not when it has no unconsumed tail left. The last case merely meaning it was able to consume all input, and not meaning it is finished.
  2. A gzip header only stores the basename of the file. The expected name in the test used the full path. Presumably because it was a relative path with no subdirectories.

I also found test cases testing a Wbits of 32+15. Wbits sizes over 31 are undocumented in both the python and zlib documentation. Can anyone explain to me what these test cases are for, and why it is a hard requirement that these undocumented assumptions may never be broken by future python releases? I found it in the docs. It autodetects gzip or zlib style compression. That is quite a neat feature!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
rhpvorderman added 2 commits September 25, 2020 11:50
@rhpvorderman
Use eof instance variable to determine whether compression has ended.
e3bf6ea
The unconsumed tail has a possibility to be empty, even if the end of compression is not reached
@rhpvorderman
Expect only basename of file stored in gzip header.
bed22ac
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Sep 25, 2020
@bedevere-bot bedevere-bot added tests Tests in the Lib/test dir awaiting review labels Sep 25, 2020
@taleinat
taleinat requested a review from Yhg1s September 26, 2020 13:04
@taleinat taleinat added skip issue skip news labels Sep 26, 2020
@taleinat

taleinat commented Sep 26, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

@rhpvorderman, thanks for this PR!

The reasoning and changes suggested look good to me, but I'm not an expert on this.

I've asked @Yhg1s, listed on the experts index as the expert on zlib, to review this.

You're welcome to ping me in a few weeks if nobody else has reviewed this PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rhpvorderman

rhpvorderman commented Dec 11, 2020

Copy link
Copy Markdown
Contributor Author

@taleinat, No reviews so far. Not that these issues are very pressing.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@taleinat

taleinat commented May 11, 2021

Copy link
Copy Markdown
Contributor

Ping, @Yhg1s?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland

erlend-aasland commented Jan 10, 2022

Copy link
Copy Markdown
Contributor

According to the devguide, this does not qualify for skip issue. IMO, this warrants an issue, despite being fairly trivial.

StanFromIreland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ezio-melotti ezio-melotti removed the CLA signed label Jul 13, 2022
@rhpvorderman rhpvorderman mentioned this pull request Oct 17, 2022
Give python-isal a mention in the zlib/gzip documentation #98347
Closed
@AA-Turner
Merge branch 'main' into smallzlibtestfixes
0573248
@StanFromIreland StanFromIreland removed the skip issue label Aug 31, 2025
@erlend-aasland erlend-aasland added the pending The issue will be closed if no feedback is provided label Sep 18, 2025
@erlend-aasland

erlend-aasland commented Sep 18, 2025

Copy link
Copy Markdown
Contributor

No response since 2020. Marking as pending close.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rhpvorderman

rhpvorderman commented Sep 19, 2025

Copy link
Copy Markdown
Contributor Author

I will close it myself then. It is not of paramount importance as it is technically not broken.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rhpvorderman rhpvorderman closed this Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Yhg1s Yhg1s Awaiting requested review from Yhg1s

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting review pending The issue will be closed if no feedback is provided skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@rhpvorderman @taleinat @erlend-aasland @the-knights-who-say-ni @ezio-melotti @bedevere-bot @StanFromIreland @AA-Turner
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — 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.