-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Implement Brotli support #2312
Implement Brotli support #2312
Conversation
Good start but tests are required. |
Codecov Report
@@ Coverage Diff @@
## master #2312 +/- ##
==========================================
+ Coverage 97.23% 97.23% +<.01%
==========================================
Files 39 39
Lines 8174 8179 +5
Branches 1430 1430
==========================================
+ Hits 7948 7953 +5
Misses 98 98
Partials 128 128
Continue to review full report at Codecov.
|
I hope this is not a big problem |
I pretty happy with the value. |
Hello there, recently I was playing with exactly brotli and were using official python package. Is there any difference between https://pypi.python.org/pypi/Brotli and https://pypi.python.org/pypi/brotlipy Can we support both of them? |
@hellysmile hello
I think no:
|
|
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.
Perfect, thank you
Looks like brotli
and brotlipy
have the same API
I'd like to have brotli compression support on both client and server sides but it's definitely a subject for other PRs
In the near future I will try to add brotli support to server side |
I mean now we do support brotli decompression only, compressing requests/responses would be very useful too. |
I got what you meant |
awesome! |
I've tried to play around brotli\brotlipy, at least test is green on both of them. |
Looks like we need mention both libraries in doc |
ok, i'll update docs |
|
||
self.zlib = zlib.decompressobj(wbits=zlib_mode) | ||
if encoding == 'br': | ||
if not HAS_BROTLI: # pragma: no cover |
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.
Why this has no cover
? Good coverage matters
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.
brotlipy
package could be added to extras in setup.py
for usability reasons.
We don't use extras in aiohttp (but I like the idea). |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
What do these changes do?
Implement Brotli support
Are there changes in behavior for the user?
No.
Related issue number
#2270
Checklist
CONTRIBUTORS.txt
changes
folder