GeezerVison is showing github.com — Minor test fixes for zlib and gzip by rhpvorderman · Pull Request #22408 · python/cpython
Conversation
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.
- 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.
- 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.
The unconsumed tail has a possibility to be empty, even if the end of compression is not reached
taleinat
commented
Sep 26, 2020
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
@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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@taleinat, No reviews so far. Not that these issues are very pressing.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
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
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
No response since 2020. Marking as pending close.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I will close it myself then. It is not of paramount importance as it is technically not broken.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
Yhg1s
Awaiting requested review from Yhg1s
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
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.
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.
|