8000 [3.13] gh-133413: Fix references to removed Request.has_data (GH-1334… · python/cpython@05ddd06 · GitHub
[go: up one dir, main page]

Skip to content

Commit 05ddd06

Browse files
[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 86c1d43) Co-authored-by: ppaez <pp@pp.com.mx>
1 parent d9d8e9a commit 05ddd06

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Doc/library/unittest.mock.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2653,9 +2653,9 @@ with any methods on the mock:
26532653

26542654
.. code-block:: pycon
26552655
2656-
>>> mock.has_data()
2656+
>>> mock.header_items()
26572657
<mock.Mock object at 0x...>
2658-
>>> mock.has_data.assret_called_with() # Intentional typo!
2658+
>>> mock.header_items.assret_called_with() # Intentional typo!
26592659
26602660
Auto-speccing solves this problem. You can either pass ``autospec=True`` to
26612661
:func:`patch` / :func:`patch.object` or use the :func:`create_autospec` function to create a

Doc/library/urllib.request.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ HTTPHandler Objects
10761076
.. method:: HTTPHandler.http_open(req)
10771077

10781078
Send an HTTP request, which can be either GET or POST, depending on
1079-
``req.has_data()``.
1079+
``req.data``.
10801080

10811081

10821082
.. _https-handler-objects:
@@ -1088,7 +1088,7 @@ HTTPSHandler Objects
10881088
.. method:: HTTPSHandler.https_open(req)
10891089

10901090
Send an HTTPS request, which can be either GET or POST, depending on
1091-
``req.has_data()``.
1091+
``req.data``.
10921092

10931093

10941094
.. _file-handler-objects:

0 commit comments

Comments
 (0)
0