https://github.com/python/cpython/commit/05ddd066244c65394e810a4a145c1bbfb3f5a41e
commit: 05ddd066244c65394e810a4a145c1bbfb3f5a41e
branch: 3.13
author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
committer: serhiy-storchaka <storch...@gmail.com>
date: 2025-05-12T18:25:25Z
summary:

[3.13] gh-133413: Fix references to removed Request.has_data (GH-133414) 
(GH-133946)

The has_data() method of http.request.Request
was removed in version 3.4.
(cherry picked from commit 86c1d439e0ccbe6baeda69322f1f8c0e6a80464c)

Co-authored-by: ppaez <p...@pp.com.mx>

files:
M Doc/library/unittest.mock.rst
M Doc/library/urllib.request.rst

diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst
index f6c616a353f5ab..becfa34db6b9bb 100644
--- a/Doc/library/unittest.mock.rst
+++ b/Doc/library/unittest.mock.rst
@@ -2653,9 +2653,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
diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
index 738455372237a8..b9673e38970560 100644
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -1076,7 +1076,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:
@@ -1088,7 +1088,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:

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to