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

Experimental support for WebSocket extension permessage-gzip #9934

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jakob-keller
Copy link

@jakob-keller jakob-keller commented Nov 17, 2024

What do these changes do?

Provides experimental support for communicating with WebSocket servers that require the non-standard permessage-gzip extension.

Are there changes in behavior for the user?

None

Is it a substantial burden for the maintainers to support this?

No

Related issue number

Fixes #9933

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
  • Add a new news fragment into the CHANGES/ folder

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Nov 17, 2024
@jakob-keller jakob-keller changed the title Permessage gzip Experimental support for WebSocket extension permessage-gzip Nov 17, 2024
@bdraco bdraco added backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot labels Nov 17, 2024
Copy link

codspeed-hq bot commented Nov 17, 2024

CodSpeed Performance Report

Merging #9934 will not alter performance

Comparing jakob-keller:permessage-gzip (19c847d) with master (73691e4)

Summary

✅ 36 untouched benchmarks

Copy link

codecov bot commented Nov 17, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 4 lines in your changes missing coverage. Please review.

Project coverage is 98.70%. Comparing base (73691e4) to head (19c847d).

Files with missing lines Patch % Lines
aiohttp/_websocket/helpers.py 76.47% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9934      +/-   ##
==========================================
- Coverage   98.72%   98.70%   -0.02%     
==========================================
  Files         120      120              
  Lines       36570    36579       +9     
  Branches     4361     4363       +2     
==========================================
+ Hits        36102    36107       +5     
- Misses        315      317       +2     
- Partials      153      155       +2     
Flag Coverage Δ
CI-GHA 98.60% <81.81%> (-0.02%) ⬇️
OS-Linux 98.28% <81.81%> (-0.02%) ⬇️
OS-Windows 96.10% <73.68%> (-0.02%) ⬇️
OS-macOS 97.38% <77.27%> (-0.01%) ⬇️
Py-3.10.11 97.22% <77.27%> (-0.02%) ⬇️
Py-3.10.15 97.82% <81.81%> (+0.04%) ⬆️
Py-3.11.10 97.81% <81.81%> (-0.03%) ⬇️
Py-3.11.9 97.26% <77.27%> (-0.02%) ⬇️
Py-3.12.7 98.35% <81.81%> (-0.02%) ⬇️
Py-3.13.0 98.29% <81.81%> (-0.01%) ⬇️
Py-3.9.13 97.14% <77.27%> (-0.02%) ⬇️
Py-3.9.20 97.74% <81.81%> (+0.03%) ⬆️
Py-pypy7.3.16 97.30% <81.81%> (-0.02%) ⬇️
VM-macos 97.38% <77.27%> (-0.01%) ⬇️
VM-ubuntu 98.28% <81.81%> (-0.02%) ⬇️
VM-windows 96.10% <73.68%> (-0.02%) ⬇️

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.

@jakob-keller
Copy link
Author

While technically feasible, the lack of specification for permessage-gzip makes this PR difficult to frame. I will pause further work on this PR until the provider of the WebSocket API clarifies their choice of compression to me.

@Dreamsorcerer
Copy link
Member

While technically feasible, the lack of specification for permessage-gzip makes this PR difficult to frame. I will pause further work on this PR until the provider of the WebSocket API clarifies their choice of compression to me.

Well, if it ends up depending on the vendor, then we'd probably need something where the user can register extensions of their choice and define how it works. Then it could be made to work with any vendor's extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for WebSocket extension permessage-gzip
3 participants