]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-103112: Add http.client.HTTPResponse.read docstring and fix pydoc output...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 29 Mar 2023 22:30:03 +0000 (15:30 -0700)
committerGitHub <noreply@github.com>
Wed, 29 Mar 2023 22:30:03 +0000 (18:30 -0400)
(cherry picked from commit d052a383f1a0c599c176a12c73a761ca00436d8b)

Co-authored-by: Bernhard Wagner <github.comNotification20120125@xmlizer.net>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Éric <merwok@netwok.org>
Lib/http/client.py
Misc/NEWS.d/next/Documentation/2023-03-29-14-51-39.gh-issue-103112.XgGSEO.rst [new file with mode: 0644]

index 4622a8f4297d31e307ebd4ffbe576110b9f9efae..eabb0ca26940c73295ad8c106e9b081e0e4c8bd7 100644 (file)
@@ -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 (file)
index 0000000..babc815
--- /dev/null
@@ -0,0 +1 @@
+Add docstring to :meth:`http.client.HTTPResponse.read` to fix ``pydoc`` output.