-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
MultiDict class construction regression #418
Labels
Comments
Merged
This was referenced Dec 12, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
With multidict 4.7.0, you cannot create a MultiDict with an iterable of key-valu data.
To Reproduce
Expected behavior
I expect to make a CIMultiDict / MultiDict with the input list of items.
Logs/tracebacks
Included in the above example.
Your version of the Python
3.7.3 compiled via pyenv on ubuntu 18.04
Your version of the multidict distribution
4.7.0
Additional context
I ran into this with testing aiohttp related calls where headers were being passed as a list of key, value pairs.
aiohttp typedefs their header arguments with a struct they call LooseHeaders defined here https://github.com/aio-libs/aiohttp/blob/v3.6.2/aiohttp/typedefs.py#L42
their docs refer to header arguments as either dicts or list of key/valu pairs https://aiohttp.readthedocs.io/en/stable/client_reference.html#client-session
That is passed into the multidict struct here https://github.com/aio-libs/aiohttp/blob/v3.6.2/aiohttp/client.py#L827
This is valid according to the multidict documentation here:
https://multidict.readthedocs.io/en/stable/multidict.html#multidict
Specifically the line
Accepted parameters are the same as for dict.
. This is no longer valid with the 4.7.0 release.The text was updated successfully, but these errors were encountered: