From 2f108eb61c03caa0efe440201d27063c0e0d2548 Mon Sep 17 00:00:00 2001 From: Bernhard Wagner Date: Wed, 29 Mar 2023 21:21:56 +0200 Subject: [PATCH] gh-103112: Add http.client.HTTPResponse.read docstring and fix pydoc output (GH-103113) (cherry picked from commit d052a383f1a0c599c176a12c73a761ca00436d8b) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bernhard Wagner Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Terry Jan Reedy Co-authored-by: Éric --- Lib/http/client.py | 1 + .../Documentation/2023-03-29-14-51-39.gh-issue-103112.XgGSEO.rst | 1 + 2 files changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Documentation/2023-03-29-14-51-39.gh-issue-103112.XgGSEO.rst diff --git a/Lib/http/client.py b/Lib/http/client.py index 4622a8f4297d31..eabb0ca26940c7 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -448,6 +448,7 @@ def isclosed(self): 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 00000000000000..babc8150966117 --- /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.