-
-
Notifications
You must be signed in to change notification settings - Fork 833
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
Made cookies construct-able from a list of tuples #1211
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
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 #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
0e2ec98
Compare
@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?) |
Yes, sure, give me a second |
0e2ec98
to
e4de55b
Compare
@florimondmanca I've reverted the last commit (so the PR contains |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Feel free to merge when you're ready. :)
I changed
CookieTypes
, added the test as it's said in #1209