-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-113199: Make read1
and readline
of HTTPResponse
close IO after reading all data
#113200
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
There is a similar case in |
HTTPResponse.read1
close IO after reading all dataread1
and readline
of HTTPResponse
close IO after reading all data
Added, thanks for the suggestion! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Yes, this is how it should be, I guess :) |
Thanks @illia-v for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
… after reading all data (pythonGH-113200) (cherry picked from commit 41336a7) Co-authored-by: Illia Volochii <[email protected]>
GH-113259 is a backport of this pull request to the 3.12 branch. |
GH-113260 is a backport of this pull request to the 3.11 branch. |
… after reading all data (pythonGH-113200) (cherry picked from commit 41336a7) Co-authored-by: Illia Volochii <[email protected]>
…O after reading all data (GH-113200) (GH-113260) (cherry picked from commit 41336a7) Co-authored-by: Illia Volochii <[email protected]>
…O after reading all data (GH-113200) (GH-113259) (cherry picked from commit 41336a7) Co-authored-by: Illia Volochii <[email protected]>
… after reading all data (pythonGH-113200)
… after reading all data (pythonGH-113200)
… after reading all data (pythonGH-113200)
The added code is very similar to what already exists in
read
:cpython/Lib/http/client.py
Lines 484 to 487 in 7322221
http.client.HTTPResponse.read1
does not close response after reading all data #113199