Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit86c1d43

Browse files
authored
gh-133413: Fix references to removed Request.has_data (GH-133414)
The has_data() method of http.request.Requestwas removed in version 3.4.
1 parent5dbd27d commit86c1d43

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)

[8]ページ先頭

©2009-2025 Movatter.jp