-
-
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
Avoid creating body writer task when there is no body #9757
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #9757 +/- ##
=======================================
Coverage 98.67% 98.67%
=======================================
Files 117 117
Lines 35896 35931 +35
Branches 4263 4267 +4
=======================================
+ Hits 35420 35455 +35
Misses 320 320
Partials 156 156
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
CodSpeed Performance ReportMerging #9757 will improve performances by 39.02%Comparing Summary
Benchmarks breakdown
|
f71e016
to
6ab8a44
Compare
Backport to 3.11: 💚 backport PR created✅ Backport PR branch: Backported as #9759 🤖 @patchback |
(cherry picked from commit b2c845b)
…en there is no body (#9759) Co-authored-by: J. Nick Koston <nick@koston.org>
This might have introduced a regression on sending an empty body with chunked.. although we likely have a guard to not do chunked with empty body I'm not sure its tested |
nope, seems ok but will add a test |
#9757 (comment) I was worried 9757 might have introduced a regression but it appears its fine. Add some coverage for this area to make sure we do not introduce one in the future from refactoring
The client would create a task to write the body even if the body was
b""
Since
GET
requests tend to be some of the most common, it makes sense to optimize for the case where only headers are sent.aiohttp 3.11.0b4 yarl 1.17.1
This PR: