You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which suggests this also needs updating. I may be mistaken, but I looks like the tests when these args were added do not cover the client side.
Expected behavior
No TypeError, but being able to define a larger accepted max_line_size and max_field_size when reading response headers from other websites.
Logs/tracebacks
Traceback (most recent call last):
File "/aiohttp_test/test.py", line 14, in <module>
asyncio.run(main())
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in runreturn loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_completereturn future.result()
File "/aiohttp_test/test.py", line 10, in mainasyncwith aiohttp.ClientSession(max_line_size=8190*2) as client:
TypeError: ClientSession.__init__() got an unexpected keyword argument 'max_line_size'
$ python -m pip show multidictName: multidictVersion: 6.0.4Summary: multidict implementationHome-page: https://github.com/aio-libs/multidictAuthor: Andrew SvetlovAuthor-email: andrew.svetlov@gmail.comLicense: Apache 2Location: /aiohttp_test/env/lib/python3.10/site-packagesRequires: Required-by: aiohttp, yarl
yarl Version
$ python -m pip show yarlName: yarlVersion: 1.9.2Summary: Yet another URL libraryHome-page: https://github.com/aio-libs/yarl/Author: Andrew SvetlovAuthor-email: andrew.svetlov@gmail.comLicense: Apache-2.0Location: /aiohttp_test/env/lib/python3.10/site-packagesRequires: idna, multidictRequired-by: aiohttp
OS
Linux firefly 5.19.0-50-generic #50-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 10 18:24:29 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Related component
Client
Additional context
Trying to crawl a page which hits the max_line_size/max_field_size limit in their headers. As I can't up the number now due to this bug, I can't access the page (even though in Chrome I can)
Code of Conduct
I agree to follow the aio-libs Code of Conduct
The text was updated successfully, but these errors were encountered:
Seems to be working for me today. Judging by your description, you must have crawled through the code and then tried to use something that hadn't been released yet...
Describe the bug
max_line_size and max_field_size args for ClientSession are returning TypeError.
To Reproduce
Used code snippet from documentation and added:
max_line_size=8190*2
for this example.Which returns:
TypeError: ClientSession.__init__() got an unexpected keyword argument 'max_line_size'
This also applied to
max_field_size
.Despite the options being in the codebase:
aiohttp/aiohttp/client.py
Line 222 in bc37e44
But 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
Which suggests this also needs updating. I may be mistaken, but I looks like the tests when these args were added do not cover the client side.
Expected behavior
No TypeError, but being able to define a larger accepted max_line_size and max_field_size when reading response headers from other websites.
Logs/tracebacks
Python Version
aiohttp Version
multidict Version
yarl Version
OS
Linux firefly 5.19.0-50-generic #50-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 10 18:24:29 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Related component
Client
Additional context
Trying to crawl a page which hits the max_line_size/max_field_size limit in their headers. As I can't up the number now due to this bug, I can't access the page (even though in Chrome I can)
Code of Conduct
The text was updated successfully, but these errors were encountered: