FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-116764: Fix regressions in urllib.parse.parse_qsl() by serhiy-storchaka · Pull Request #116801 · python/cpython · GitHub

/ cpython Public

gh-116764: Fix regressions in urllib.parse.parse_qsl() - #116801

Merged
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:parse_qsl-false-value
Mar 16, 2024
Merged

gh-116764: Fix regressions in urllib.parse.parse_qsl()#116801
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:parse_qsl-false-value

Conversation

serhiy-storchaka commented Mar 14, 2024
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

* Restore support of None and other false values (fix regression
  introduced in pythongh-74668).
* Raise TypeError for non-zero integers and non-empty sequences.

msullivan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Makes sense to me!

Comment thread Lib/urllib/parse.py
qs = bytes(qs)
if not qs:
return []
qs = bytes(memoryview(qs))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

No, it is not so common. Added a comment.

serhiy-storchaka changed the title gh-116764: Fix urllib.parse.parse_qsl() gh-116764: Fix regressions in urllib.parse.parse_qsl() Mar 15, 2024
serhiy-storchaka merged commit 1069a46 into python:main Mar 16, 2024

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

serhiy-storchaka deleted the parse_qsl-false-value branch March 16, 2024 10:36
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 16, 2024
…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 <storchaka@gmail.com>

bedevere-app Bot commented Mar 16, 2024

Copy link
Copy Markdown

GH-116894 is a backport of this pull request to the 3.12 branch.

bedevere-app Bot removed the needs backport to 3.12 only security fixes label Mar 16, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 16, 2024
…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 <storchaka@gmail.com>

bedevere-app Bot commented Mar 16, 2024

Copy link
Copy Markdown

GH-116895 is a backport of this pull request to the 3.11 branch.

bedevere-app Bot removed the needs backport to 3.11 only security fixes label Mar 16, 2024
serhiy-storchaka added a commit that referenced this pull request Mar 16, 2024
) (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 <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Mar 16, 2024
) (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 <storchaka@gmail.com>
vstinner pushed a commit to vstinner/cpython that referenced this pull request Mar 20, 2024
…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).
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
…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).
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
…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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL