Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add kwargs para for request #10100

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
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
2 changes: 2 additions & 0 deletions aiohttp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,7 @@ def request(
read_bufsize: Optional[int] = None,
max_line_size: int = 8190,
max_field_size: int = 8190,
Comment on lines 1399 to 1401
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of these options are defined in _RequestOptions, all the duplicates will need to be removed (as highlighted by the mypy error).

**kwargs: Unpack[_RequestOptions],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to use the same if/else logic as I linked to in the issue in order to support older versions of Python.

) -> _SessionRequestContextManager:
"""Constructs and sends a request.

Expand Down Expand Up @@ -1471,6 +1472,7 @@ def request(
read_bufsize=read_bufsize,
max_line_size=max_line_size,
max_field_size=max_field_size,
**kwargs,
),
session,
)
Loading