-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
Support quoting list values in mappings #443
Conversation
I haven't checked performance but if it's an issue it can be improved by re-implementing Edit: running
Running now:
Probably within noise, it's not like I changed any code the |
With regards to:
Is that necessary? Taking a quick look at the commit log, it seems to be used inconsistently anyway (and many commits don't follow that convention). If it's desired I can rebase and force push, otherwise maybe I'll send another PR updating it. |
Oh, I hadn't seen the |
This comment has been minimized.
This comment has been minimized.
No, that template is used by towncrier to generate |
It's not about the commit messages but about the changes to docs. |
This helps keep the code more readable after fmt with black.
I've also added test for edge cases where the list/tuple are empty or have a single item which we didn't have before. I think it should be ready for review again. |
Bumping this now that we're on the weekend. Is there any reason not to merge this other than lack of time? |
@Lonami I'd like tests and mentions in all docs for |
Yeah don't mind the extra space there it's fixed in the next commit which I'll push once I polish. |
Changing the test to compare def test_stuff():
url = URL("http://example.com/path")
u2 = url.with_query([("a[]", "3"), ("a[]", "4")])
assert str(u2) == "http://example.com/path?a[]=3&a[]=4" With:
So I suppose it's fine to fix this because people relying on it being escaped was buggy (not intended) behaviour. I'm not sure if this should be fixed here or as a separate patch. |
Opened #445 to address that. |
As per #445 (review), use encoded values for the square brackets in tests. It is still useful to have tests with non-letter values. |
I have "ported" the test using a list of tuples from https://github.com/aio-libs/yarl/pull/445/files#diff-ae226bc0f15cb48ba935d31884c1034dR226 over the new |
Hooray 🎉, thanks! |
What do these changes do?
These changes resolve aio-libs/aiohttp#4714.
Are there changes in behavior for the user?
Yes, users can now use lists or tuples when quoting mappings.
Checklist
CHANGES
folder<issue_id>.<type>
(e.g.588.bugfix
)issue_id
change it to the pr id after creating the PR.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.Fix issue with non-ascii contents in doctest text files.