-
-
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 passing client writer to response when already finished #9485
Conversation
With Python 3.12+ its likely that the writer can finish synchronously. In this case avoid passing it to the response since it will get unset right away needlessly
With Python 3.12+ its likely that the writer can finish synchronously. In this case avoid passing it to the response since it will get unset right away needlessly
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 #9485 +/- ##
==========================================
- Coverage 98.59% 98.59% -0.01%
==========================================
Files 105 105
Lines 35094 35093 -1
Branches 4179 4179
==========================================
- Hits 34601 34600 -1
Misses 329 329
Partials 164 164
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Backport to 3.10: 💚 backport PR created✅ Backport PR branch: Backported as #9492 🤖 @patchback |
(cherry picked from commit da0099d)
Backport to 3.11: 💚 backport PR created✅ Backport PR branch: Backported as #9493 🤖 @patchback |
(cherry picked from commit da0099d)
…ponse when already finished (#9492) Co-authored-by: J. Nick Koston <nick@koston.org>
…ponse when already finished (#9493) Co-authored-by: J. Nick Koston <nick@koston.org>
What do these changes do?
With Python 3.12+ its likely that the writer can finish synchronously (on a production HA instance, it always did for all samples in a 60s period). In this case avoid passing it to the response since it will get unset right away needlessly
Are there changes in behavior for the user?
no