Skip to content

Commit 3115240

Browse files
Refactor ClientRequest (#11012)
1 parent 6a2809d commit 3115240

16 files changed

+2091
-1755
lines changed

CHANGES/11012.breaking.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Refactored ``ClientRequest`` class. This simplifies a lot of code and improves our type
2+
checking accuracy. It also better aligns public/private attributes with what we expect
3+
developers to access safely from a client middleware.
4+
5+
If code subclasses ``ClientRequest``, it is likely that the subclass will need tweaking
6+
to be compatible with the new version. Similarly, subclasses of ``ClientResponse`` may
7+
need to adjust ``__init__`` parameters.
8+
9+
-- by :user:`Dreamsorcerer`.

aiohttp/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ async def _connect_and_send_request(
684684
max_field_size=max_field_size,
685685
)
686686
try:
687-
resp = await req.send(conn)
687+
resp = await req._send(conn)
688688
try:
689689
await resp.start(conn)
690690
except BaseException:

0 commit comments

Comments
 (0)