]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-133413: Fix references to removed Request.has_data (GH-133414)
authorppaez <pp@pp.com.mx>
Mon, 12 May 2025 18:17:57 +0000 (12:17 -0600)
committerGitHub <noreply@github.com>
Mon, 12 May 2025 18:17:57 +0000 (21:17 +0300)
The has_data() method of http.request.Request
was removed in version 3.4.

Doc/library/unittest.mock.rst
Doc/library/urllib.request.rst

index 27c169dde727803a70d234a82d0a9f10809227a0..091562cc9aef984398bd580230af8a34c9d0ba89 100644 (file)
@@ -2654,9 +2654,9 @@ with any methods on the mock:
 
 .. code-block:: pycon
 
-    >>> mock.has_data()
+    >>> mock.header_items()
     <mock.Mock object at 0x...>
-    >>> mock.has_data.assret_called_with()  # Intentional typo!
+    >>> mock.header_items.assret_called_with()  # Intentional typo!
 
 Auto-speccing solves this problem. You can either pass ``autospec=True`` to
 :func:`patch` / :func:`patch.object` or use the :func:`create_autospec` function to create a
index b0f26724d0c78ec7987eff8384b85546f01301ad..58bd111b5cc374f63920e35436b5adfe4aa800bf 100644 (file)
@@ -1121,7 +1121,7 @@ HTTPHandler Objects
 .. method:: HTTPHandler.http_open(req)
 
    Send an HTTP request, which can be either GET or POST, depending on
-   ``req.has_data()``.
+   ``req.data``.
 
 
 .. _https-handler-objects:
@@ -1133,7 +1133,7 @@ HTTPSHandler Objects
 .. method:: HTTPSHandler.https_open(req)
 
    Send an HTTPS request, which can be either GET or POST, depending on
-   ``req.has_data()``.
+   ``req.data``.
 
 
 .. _file-handler-objects: