From: Bernhard Wagner Date: Wed, 29 Mar 2023 19:21:56 +0000 (+0200) Subject: gh-103112: Add http.client.HTTPResponse.read docstring and fix pydoc output (#103113) X-Git-Tag: v3.12.0a7~43 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d052a383f1a0c599c176a12c73a761ca00436d8b;p=thirdparty%2FPython%2Fcpython.git gh-103112: Add http.client.HTTPResponse.read docstring and fix pydoc output (#103113) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Terry Jan Reedy Co-authored-by: Éric --- diff --git a/Lib/http/client.py b/Lib/http/client.py index 15c5cf634cf5..bd55e7d239af 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -448,6 +448,7 @@ class HTTPResponse(io.BufferedIOBase): return self.fp is None def read(self, amt=None): + """Read and return the response body, or up to the next amt bytes.""" if self.fp is None: return b"" diff --git a/Misc/NEWS.d/next/Documentation/2023-03-29-14-51-39.gh-issue-103112.XgGSEO.rst b/Misc/NEWS.d/next/Documentation/2023-03-29-14-51-39.gh-issue-103112.XgGSEO.rst new file mode 100644 index 000000000000..babc81509661 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2023-03-29-14-51-39.gh-issue-103112.XgGSEO.rst @@ -0,0 +1 @@ +Add docstring to :meth:`http.client.HTTPResponse.read` to fix ``pydoc`` output.