-
-
Notifications
You must be signed in to change notification settings - Fork 857
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
Allow tuple as input of query parameters. #1426
Conversation
In the documentation it is stated that params can be dict, string or two tuples. This allows to used two tuples. Previously it was possible to use only tuple inside a list.
The documentation is not wrong, it states specifically that "a list of two-tuples" is allowed.
While a tuple of two-tuples should be fine, I'd like to hear the other maintainers thoughts on it. If accepted, you will also need to update the documentation to include "list or tuple of two-tuples." everywhere query params are mentioned, and adjust the Lines 34 to 41 in 354c4ca
Tuple[Tuple[str, PrimitiveData]], which should fix the currently failing mypy tests.
|
@StephenBrown2 good point about the docs! So actually I think it is important to mention how I found this thing - at the moment we are moving some API agents from |
Ah yes, that is an important note! We certainly want to maintain requests compatibility where possible, so go ahead and make the changes I suggested and the others can weigh in once that's done. |
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 as this is — "sequence" in the docs, (list, tuple)
in implementation.
@SarunasAzna Thanks! |
In the documentation it is stated that params can be dict, string or two
tuples. This allows to used two tuples. Previously it was possible to
use only tuple inside a list.