-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
Conversation
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.
LGTM!
just please add a changeling file
@WisdomPill |
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@myungsegyo could you rebase your PR please? |
@WisdomPill |
django_redis/compressors/gzip.py
Outdated
except gzip.BadGzipFile as e: | ||
raise CompressorError(e) |
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.
except gzip.BadGzipFile as e: | |
raise CompressorError(e) | |
except gzip.BadGzipFile as e: | |
raise CompressorError from e |
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.
this will fix ruff's error
def decompress(self, value: bytes) -> bytes: | ||
try: | ||
return gzip.decompress(value) | ||
except gzip.BadGzipFile as e: |
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.
this is not available for python 3.6 and 3.7, read here
@WisdomPill |
Hello guys.
I added gzip compression support.
This is my first PR so please let me know if there are any mistakes.