Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Refactor ClientRequest (aio-libs#11012)
  • Loading branch information
Dreamsorcerer authored Oct 24, 2025
commit 3115240561aa3b8ac91c72c7aead3fa2f8e29f3a
9 changes: 9 additions & 0 deletions CHANGES/11012.breaking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Refactored ``ClientRequest`` class. This simplifies a lot of code and improves our type
checking accuracy. It also better aligns public/private attributes with what we expect
developers to access safely from a client middleware.

If code subclasses ``ClientRequest``, it is likely that the subclass will need tweaking
to be compatible with the new version. Similarly, subclasses of ``ClientResponse`` may
need to adjust ``__init__`` parameters.

-- by :user:`Dreamsorcerer`.
2 changes: 1 addition & 1 deletion aiohttp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ async def _connect_and_send_request(
max_field_size=max_field_size,
)
try:
resp = await req.send(conn)
resp = await req._send(conn)
try:
await resp.start(conn)
except BaseException:
Expand Down
Loading