-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update _compression, gzip, and test_gzip for CPython v3.11.2 #4688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
See #4564. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's really good decision 😄
thank you!
@@ -1,7 +1,7 @@ | |||
"""Internal classes used by the gzip, lzma and bz2 modules""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by looking the header, bz2 also seems to depending on here. could you also update it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have no bz2
rust library, unfortunately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we don't support this operator yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thank you!
13687c3
to
407f3f5
Compare
Updated
_compression.py
to 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.py
and 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.