Skip to content
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

Support gzip compression #688

Merged
merged 4 commits into from
Nov 17, 2023
Merged

Support gzip compression #688

merged 4 commits into from
Nov 17, 2023

Conversation

myungsegyo
Copy link
Contributor

Hello guys.
I added gzip compression support.
This is my first PR so please let me know if there are any mistakes.

Copy link
Member

@WisdomPill WisdomPill left a comment

Choose a reason for hiding this comment

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

LGTM!

just please add a changeling file

@myungsegyo
Copy link
Contributor Author

@WisdomPill
Thank you for your review
I added a changeling file

@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (55097ae) 61.1% compared to head (09b9c68) 36.3%.

❗ Current head 09b9c68 differs from pull request most recent head 4dee637. Consider uploading reports for the commit 4dee637 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #688      +/-   ##
=========================================
- Coverage    61.1%   36.3%   -24.7%     
=========================================
  Files          41      43       +2     
  Lines        2637    2620      -17     
  Branches      142      69      -73     
=========================================
- Hits         1611     951     -660     
- Misses       1013    1600     +587     
- Partials       13      69      +56     
Flag Coverage Δ
mypy 36.3% <100.0%> (-1.3%) ⬇️
tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@WisdomPill
Copy link
Member

@myungsegyo could you rebase your PR please?

@myungsegyo
Copy link
Contributor Author

@WisdomPill
I rebased my branch but some of tests fail until now.
Is there something for me to do?

Comment on lines 18 to 19
except gzip.BadGzipFile as e:
raise CompressorError(e)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
except gzip.BadGzipFile as e:
raise CompressorError(e)
except gzip.BadGzipFile as e:
raise CompressorError from e

Copy link
Member

Choose a reason for hiding this comment

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

this will fix ruff's error

def decompress(self, value: bytes) -> bytes:
try:
return gzip.decompress(value)
except gzip.BadGzipFile as e:
Copy link
Member

Choose a reason for hiding this comment

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

this is not available for python 3.6 and 3.7, read here

@myungsegyo
Copy link
Contributor Author

@WisdomPill
I think this PR can be merged now!
Thank you for your kind review.

@WisdomPill WisdomPill merged commit d7f1292 into jazzband:master Nov 17, 2023
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants