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

[PR #9795/fcb790b1 backport][3.11] Switch WebSocketWriter to use removesuffix to drop compression trailer #9805

Conversation

patchback[bot]
Copy link
Contributor

@patchback patchback bot commented Nov 11, 2024

This is a backport of PR #9795 as merged into master (fcb790b).

Now that Python 3.8 is no longer supported (master and 3.11 only) we can use bytes.removesuffix

This also takes care of one uncovered branch in the tests and brings the WebSocketWriter up to 100% line/branch coverage

Its small improvement, considering how much time the compression actually takes. It will be >10% if using isal for compression though since the compression overhead is far less when using alternative zlib see #9798
Screenshot 2024-11-11 at 8 31 43 AM

Copy link

codspeed-hq bot commented Nov 11, 2024

CodSpeed Performance Report

Merging #9805 will not alter performance

Comparing patchback/backports/3.11/fcb790b12810cd823a1a138520152dd755f5b2bf/pr-9795 (48588ac) with 3.11 (c6270f2)

Summary

✅ 16 untouched benchmarks

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.97%. Comparing base (c6270f2) to head (48588ac).
Report is 2 commits behind head on 3.11.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             3.11    #9805   +/-   ##
=======================================
  Coverage   97.97%   97.97%           
=======================================
  Files         119      119           
  Lines       36114    36111    -3     
  Branches     4329     4328    -1     
=======================================
- Hits        35382    35380    -2     
  Misses        546      546           
+ Partials      186      185    -1     
Flag Coverage Δ
CI-GHA 97.86% <100.00%> (+<0.01%) ⬆️
OS-Linux 97.56% <100.00%> (+<0.01%) ⬆️
OS-Windows 94.39% <100.00%> (+<0.01%) ⬆️
OS-macOS 96.65% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 96.50% <100.00%> (+<0.01%) ⬆️
Py-3.10.15 97.11% <100.00%> (+<0.01%) ⬆️
Py-3.11.10 97.18% <100.00%> (+0.04%) ⬆️
Py-3.11.9 96.58% <100.00%> (+0.01%) ⬆️
Py-3.12.7 97.63% <100.00%> (+<0.01%) ⬆️
Py-3.13.0 97.61% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 96.43% <100.00%> (+<0.01%) ⬆️
Py-3.9.20 97.02% <100.00%> (+0.01%) ⬆️
Py-pypy7.3.16 96.59% <100.00%> (-0.01%) ⬇️
VM-macos 96.65% <100.00%> (+<0.01%) ⬆️
VM-ubuntu 97.56% <100.00%> (+<0.01%) ⬆️
VM-windows 94.39% <100.00%> (+<0.01%) ⬆️

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.

@bdraco bdraco enabled auto-merge (squash) November 11, 2024 15:17
@bdraco bdraco merged commit 255bf5c into 3.11 Nov 11, 2024
33 of 34 checks passed
@bdraco bdraco deleted the patchback/backports/3.11/fcb790b12810cd823a1a138520152dd755f5b2bf/pr-9795 branch November 11, 2024 15:29
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.

1 participant