-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Avoid creating closed futures that will never be awaited #11107
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
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 #11107 +/- ##
=======================================
Coverage 98.82% 98.83%
=======================================
Files 129 129
Lines 41505 41542 +37
Branches 2234 2238 +4
=======================================
+ Hits 41019 41056 +37
Misses 337 337
Partials 149 149
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 #11107 will not alter performanceComparing Summary
|
Backport to 3.12: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 21d640d on top of patchback/backports/3.12/21d640dc4b046be18bcb42aad8fa5445198fd219/pr-11107 Backporting merged PR #11107 into master
🤖 @patchback |
Backport to 3.13: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 21d640d on top of patchback/backports/3.13/21d640dc4b046be18bcb42aad8fa5445198fd219/pr-11107 Backporting merged PR #11107 into master
🤖 @patchback |
(cherry picked from commit 21d640d)
(cherry picked from commit 21d640d)
… will never be awaited (#11111)
… will never be awaited (#11110)
Summary
This PR is a follow-up to #11100 and #3733 that avoids creating closed futures in
ResponseHandler
that will never be awaited, preventing spurious "Future exception was never retrieved" warnings.Changes
Lazy Creation of Closed Future
ResponseHandler.closed
from eagerly creating a future in__init__
to lazily creating it only when accessedNone
ifconnection_lost()
was called before the property was ever accessedConnector Updates
BaseConnector.close()
to check ifproto.closed
is not None before adding it to waitersBenefits
Testing
The changes include comprehensive test coverage to ensure:
Related Issues