Skip to content

Commit 86c1d43

Browse files
authored
gh-133413: Fix references to removed Request.has_data (GH-133414)
The has_data() method of http.request.Request was removed in version 3.4.
1 parent 5dbd27d commit 86c1d43

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
@@ -2654,9 +2654,9 @@ with any methods on the mock:
26542654

26552655
.. code-block:: pycon
26562656
2657-
>>> mock.has_data()
2657+
>>> mock.header_items()
26582658
<mock.Mock object at 0x...>
2659-
>>> mock.has_data.assret_called_with() # Intentional typo!
2659+
>>> mock.header_items.assret_called_with() # Intentional typo!
26602660
26612661
Auto-speccing solves this problem. You can either pass ``autospec=True`` to
26622662
: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
@@ -1121,7 +1121,7 @@ HTTPHandler Objects
11211121
.. method:: HTTPHandler.http_open(req)
11221122

11231123
Send an HTTP request, which can be either GET or POST, depending on
1124-
``req.has_data()``.
1124+
``req.data``.
11251125

11261126

11271127
.. _https-handler-objects:
@@ -1133,7 +1133,7 @@ HTTPSHandler Objects
11331133
.. method:: HTTPSHandler.https_open(req)
11341134

11351135
Send an HTTPS request, which can be either GET or POST, depending on
1136-
``req.has_data()``.
1136+
``req.data``.
11371137

11381138

11391139
.. _file-handler-objects:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy