This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sattler
Recipients sattler
Date 2021-11-22.22:35:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
  urllib.parse.parse_qsl('', strict_parsing=True)
yields an error:
  ValueError: bad query field: ''

The empty string '' is produced by
and also as query string by
so it should be accepted by urllib.parse.parse_qsl with strict parsing. 

The problem is that parse_qsl(qs, ...) cannot distinguish between zero and one query arguments. The call to qs.split(separator) returns the non-empty list [''] for qs empty, which means one query argument. However, in this case, we want the other semantics.
Date User Action Args
2021-11-22 22:35:40sattlersetrecipients: + sattler
2021-11-22 22:35:40sattlersetmessageid: <>
2021-11-22 22:35:40sattlerlinkissue45874 messages
2021-11-22 22:35:40sattlercreate