Uh oh!
There was an error while loading. Please reload this page.
Made cookies construct-able from a list of tuples - #1211
Conversation
florimondmanca
left a comment
There was a problem hiding this comment.
Looks good!
Question: do we allow only lists for other parameters such as headers and data, or do they a more general Sequence of tuples? Just wanted to make sure we're also being consistent there.
@florimondmanca Lines 40 to 46 in 15c1e42 |
florimondmanca
commented
Aug 21, 2020
Yes, but on the other hand query params accept a List, so hmm. Maybe it's a separate discussion we can have. I do remember that we've had issues with mypy flagging some cases as not acceptable, which required using sequence and mapping instead of list and dict, so maybe that's where these differences come from. Anyway this PR is consistent with itself - only accept a list of tuples. If we find out that we need to expand to a sequence then let's reconsider at that point? (So far the usage of Dict with cookies doesn't seem to have been a problem.) |
Now I see that https://github.com/encode/httpx/issues/1209 is related to I see that you have accepted the ticket, but can I change Update I changed typing from If commits-after-approval are not allowed, I can revert it back |
749bcb6 to
0e2ec98Compareflorimondmanca
commented
Aug 22, 2020
@cdeler As discussed on Gitter, could we consider sticking to List instead of Sequence for now? (We can add Sequence if we need to later, but adding it right now means more API surface that's not necessarily required, which we generally want to keep at the lowest level possible. Makes sense?) |
cdeler
commented
Aug 22, 2020
Yes, sure, give me a second |
0e2ec98 to
e4de55bComparecdeler
commented
Aug 22, 2020
@florimondmanca I've reverted the last commit (so the PR contains |
florimondmanca
left a comment
There was a problem hiding this comment.
LGTM! Feel free to merge when you're ready. :)
I changed
CookieTypes, added the test as it's said in https://github.com/encode/httpx/issues/1209