Closed
Description
Bug report
Bug description:
#115771 introduced a change in some currently working behavior. Previously:
import urllib.parse
>>> urllib.parse.parse_qsl(None)
[]
but now it raises TypeError: cannot convert 'NoneType' object to bytes
.
(parse_qs
also broke, since it calls parse_qsl
)
I think it's obviously pretty debatable whether the old behavior was desirable but there is popular code in the wild that depends on it: https://github.com/encode/httpx/blob/7df47ce4d93a06f2c3310cd692b4c2336d7663ba/httpx/_urls.py#L431-L433.
(I stumbled across this when one of my colleagues was accidentally using a current dev branch of 3.11 and started getting mysterious errors from inside the bowels of the httpx client.)
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux