-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Clean up redundant code and stale comments from PR #11290 #11301
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 #11301 +/- ##
==========================================
- Coverage 98.84% 98.84% -0.01%
==========================================
Files 131 131
Lines 43433 43430 -3
Branches 2331 2331
==========================================
- Hits 42933 42930 -3
Misses 346 346
Partials 154 154
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 #11301 will not alter performanceComparing Summary
|
Backport to 3.12: 💚 backport PR created✅ Backport PR branch: Backported as #11318 🤖 @patchback |
Backport to 3.13: 💚 backport PR created✅ Backport PR branch: Backported as #11319 🤖 @patchback |
What do these changes do?
This PR addresses review comments from PR #11290 by:
IOBasePayload.size
property - the exceptions are already handled by the outer try-exceptAre there changes in behavior for the user?
No behavioral changes. This is purely a code cleanup that removes redundancy while maintaining the exact same functionality.
Is it a substantial burden for the maintainers to support this?
No, this actually reduces maintenance burden by:
Related issue number
Follow-up to #11290 (addressing review comments)
Related to #11270 (original bug fix)
Checklist
CONTRIBUTORS.txt
CHANGES/
folderSummary of Changes
1. Removed redundant code in
aiohttp/payload.py
:The inner try-except was redundant because:
size
property already catchesAttributeError
andOSError
self._value.tell()
will be caught by the outer handler2. Updated test comments in
tests/test_payload.py
:test_iobase_payload_size_after_reading
3. Updated test comments in
tests/test_client_functional.py
:test_file_upload_307_308_redirect
from "demonstrates the bug" to "verifies that file payloads maintain correct Content-Length"All tests continue to pass, confirming the redundant code was indeed unnecessary.