Update _compression, gzip, and test_gzip for CPython v3.11.2#4688
Merged
youknowone merged 2 commits intoRustPython:mainfrom Mar 15, 2023
Merged
Update _compression, gzip, and test_gzip for CPython v3.11.2#4688youknowone merged 2 commits intoRustPython:mainfrom
youknowone merged 2 commits intoRustPython:mainfrom
Conversation
Contributor
Author
|
See #4564. |
youknowone
reviewed
Mar 13, 2023
Member
youknowone
left a comment
There was a problem hiding this comment.
That's really good decision 😄
thank you!
| @@ -1,7 +1,7 @@ | |||
| """Internal classes used by the gzip, lzma and bz2 modules""" | |||
Member
There was a problem hiding this comment.
by looking the header, bz2 also seems to depending on here. could you also update it?
Contributor
There was a problem hiding this comment.
We have no bz2 rust library, unfortunately.
Contributor
Author
There was a problem hiding this comment.
Yeah, I hit the SkipTest: No module named ' bz2' when I copied over and ran the test_bz2.py as there were no changes in the Lib/bz2.py. Would this be connected to the bz2.rs in stdlib/src/
| # sys.maxsize means the max length of output buffer is unlimited, | ||
| # so that the whole input buffer can be decompressed within one | ||
| # .decompress() call. | ||
| while data := self.read(sys.maxsize): |
Member
There was a problem hiding this comment.
maybe we don't support this operator yet
Contributor
Author
13687c3 to
407f3f5
Compare
fanninpm
reviewed
Mar 15, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Updated
_compression.pyto match CPython v3.11.2. I didn't see any immediate unit test for this, so it seemed fit to test using a library that relies on_compression.py. I updatedgzip.py/test_gzip.pyand accounted for the unexpected failures ontest_gzip.py.The failures were primarily wbit errors tracing to
stdlib/src/zlib.rs, but I am not familiar enough with this module in rust to correct the issues.