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

Client session new args max_line_size and max_field_size #6744

Closed
wants to merge 5 commits into from

Conversation

starflows
Copy link
Contributor

@starflows starflows commented May 9, 2022

What do these changes do?

Add new arguments max_line_size and max_field_size to ClientSession.

Are there changes in behavior for the user?

No, both arguments are optional and will use the same default values as previously when unset.

Related issue number

#2304
#2988
#3862

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label May 9, 2022
@Dreamsorcerer
Copy link
Member

I'll leave this one for @asvetlov to evaluate when he comes back. It looks like he has some kind of plan for this: #2304 (comment)

But, #2988 and #3862 appear to be unrelated. They both refer to setting limits in an Application in regards to incoming requests.

@codecov
Copy link

codecov bot commented May 10, 2022

Codecov Report

Merging #6744 (644787b) into master (72d3d4b) will decrease coverage by 0.00%.
The diff coverage is 91.42%.

@@            Coverage Diff             @@
##           master    #6744      +/-   ##
==========================================
- Coverage   93.44%   93.43%   -0.01%     
==========================================
  Files         104      104              
  Lines       30627    30697      +70     
  Branches     3076     3086      +10     
==========================================
+ Hits        28620    28683      +63     
- Misses       1838     1844       +6     
- Partials      169      170       +1     
Flag Coverage Δ
unit 93.36% <91.42%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiohttp/client.py 24.51% <0.00%> (-0.33%) ⬇️
aiohttp/client_proto.py 96.71% <ø> (ø)
tests/test_client_functional.py 98.54% <100.00%> (+0.04%) ⬆️
aiohttp/web_protocol.py 89.39% <0.00%> (-0.29%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72d3d4b...644787b. Read the comment docs.

@sumeshmurali
Copy link

Is this feature available to use?

@fili
Copy link

fili commented Aug 11, 2023

It looks like this is in the most recent codebase:

max_line_size: int = 8190,

added using:

ecd9c72

However, trying to use this leads to the following error:

TypeError: ClientSession.__init__() got an unexpected keyword argument 'max_line_size'

And it is also missing from the official documentation:
https://docs.aiohttp.org/en/stable/_modules/aiohttp/client.html#ClientSession
https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.ClientSession

@Dreamsorcerer
Copy link
Member

Ah, didn't notice the duplicate. There are tests in that code, so if you can change one to reproduce the failure and fix the problem, then we can merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants