[Python-checkins] [3.10] gh-103112: Add http.client.HTTPResponse.read docstring and fix pydoc output (GH-103113) (#103120)

terryjreedy webhook-mailer at python.org
Wed Mar 29 18:30:34 EDT 2023


https://github.com/python/cpython/commit/3a27be79527368804c3a1c19c5bbe07a8e8ce41e
commit: 3a27be79527368804c3a1c19c5bbe07a8e8ce41e
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: terryjreedy <tjreedy at udel.edu>
date: 2023-03-29T18:30:27-04:00
summary:

[3.10] gh-103112: Add http.client.HTTPResponse.read docstring and fix pydoc output (GH-103113) (#103120)

(cherry picked from commit d052a383f1a0c599c176a12c73a761ca00436d8b)

Co-authored-by: Bernhard Wagner <github.comNotification20120125 at xmlizer.net>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy at udel.edu>
Co-authored-by: Éric <merwok at netwok.org>

files:
A Misc/NEWS.d/next/Documentation/2023-03-29-14-51-39.gh-issue-103112.XgGSEO.rst
M Lib/http/client.py

diff --git a/Lib/http/client.py b/Lib/http/client.py
index 28527fa8786e..d1b7b1048c91 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 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.



More information about the Python-checkins mailing list