bpo-42967: coerce bytes separator to string in urllib.parse_qs(l) (#2… · python/cpython@b38601d · GitHub
Skip to content

Commit b38601d

Browse files
bpo-42967: coerce bytes separator to string in urllib.parse_qs(l) (#24818)
* coerce bytes separator to string * Add news * Update Misc/NEWS.d/next/Library/2021-03-11-00-31-41.bpo-42967.2PeQRw.rst
1 parent 63bf1ab commit b38601d

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

Lib/test/test_urlparse.py

Lines changed: 4 additions & 0 deletions

Lib/urllib/parse.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ def parse_qsl(qs, keep_blank_values=False, strict_parsing=False,
733733
Returns a list, as G-d intended.
734734
"""
735735
qs, _coerce_result = _coerce_args(qs)
736+
separator, _ = _coerce_args(separator)
736737

737738
if not separator or (not isinstance(separator, (str, bytes))):
738739
raise ValueError("Separator must be of type string or bytes.")
Lines changed: 3 additions & 0 deletions

0 commit comments

Comments
 (0)