-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
gh-116764: Fix regressions in urllib.parse.parse_qsl() #116801
gh-116764: Fix regressions in urllib.parse.parse_qsl() #116801
Conversation
* Restore support of None and other false values (fix regression introduced in pythongh-74668). * Raise TypeError for non-zero integers and non-empty sequences.
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.
Makes sense to me!
qs = bytes(qs) | ||
if not qs: | ||
return [] | ||
qs = bytes(memoryview(qs)) |
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.
Is it worth having a comment why going through memoryview
first is needed (to disallow stuff like bytes(10)
?), or is that trick idiomatic in standard library code?
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.
No, it is not so common. Added a comment.
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
…H-116801) * Restore support of None and other false values. * Raise TypeError for non-zero integers and non-empty sequences. The regressions were introduced in pythongh-74668 (bdba8ef). (cherry picked from commit 1069a46) Co-authored-by: Serhiy Storchaka <[email protected]>
GH-116894 is a backport of this pull request to the 3.12 branch. |
…H-116801) * Restore support of None and other false values. * Raise TypeError for non-zero integers and non-empty sequences. The regressions were introduced in pythongh-74668 (bdba8ef). (cherry picked from commit 1069a46) Co-authored-by: Serhiy Storchaka <[email protected]>
GH-116895 is a backport of this pull request to the 3.11 branch. |
) (GH-116894) * Restore support of None and other false values. * Raise TypeError for non-zero integers and non-empty sequences. The regressions were introduced in gh-74668 (bdba8ef). (cherry picked from commit 1069a46) Co-authored-by: Serhiy Storchaka <[email protected]>
) (GH-116895) * Restore support of None and other false values. * Raise TypeError for non-zero integers and non-empty sequences. The regressions were introduced in gh-74668 (bdba8ef). (cherry picked from commit 1069a46) Co-authored-by: Serhiy Storchaka <[email protected]>
…H-116801) * Restore support of None and other false values. * Raise TypeError for non-zero integers and non-empty sequences. The regressions were introduced in pythongh-74668 (bdba8ef).
…H-116801) * Restore support of None and other false values. * Raise TypeError for non-zero integers and non-empty sequences. The regressions were introduced in pythongh-74668 (bdba8ef).
…H-116801) * Restore support of None and other false values. * Raise TypeError for non-zero integers and non-empty sequences. The regressions were introduced in pythongh-74668 (bdba8ef).
urllib.parse.parse_qsl(None)
behavior #116764