-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Use dunder writer internally in ClientResponse #9340
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
In #7815 the writer was wrapped with a setter to make sure it was always reset on completion and maintain compat for subclasses. This added a tiny bit of overhead since we access self._writer in a lot of places. We can access self.__writer instead since its all inside the class which has less overhead.
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 #9340 +/- ##
==========================================
- Coverage 98.56% 98.56% -0.01%
==========================================
Files 107 107
Lines 34942 34942
Branches 4145 4145
==========================================
- Hits 34441 34439 -2
- Misses 334 335 +1
- Partials 167 168 +1
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: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 8a97e03 on top of patchback/backports/3.10/8a97e03b447d58b8ca0f675dffebb1c05727b286/pr-9340 Backporting merged PR #9340 into master
🤖 @patchback |
Backport to 3.11: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 8a97e03 on top of patchback/backports/3.11/8a97e03b447d58b8ca0f675dffebb1c05727b286/pr-9340 Backporting merged PR #9340 into master
🤖 @patchback |
(cherry picked from commit 8a97e03)
(cherry picked from commit 8a97e03)
What do these changes do?
In #7815 the writer was wrapped with a setter to make sure it was always reset on completion and maintain compat for subclasses. This added a tiny bit of overhead since we access self._writer in a lot of places. We can access self.__writer instead since its all inside the class which has less overhead.
We still have a few spikes that would be nice to sort out, but they are getting to be more consistent

Are there changes in behavior for the user?
no
Is it a substantial burden for the maintainers to support this?
no