yarl
yarl copied to clipboard
update_query(None) doesn't clear the query
Describe the bug
url.update_query(None)
doesn't clear the query
To Reproduce
In reality it does this:
>>> URL('https://mysite.org?what=this').update_query(None)
URL('https://mysite.org/?what=this')
Expected behavior
The doc says:
URL.update_query(query)
URL.update_query(**kwargs)
Returns a new URL with query part updated.
...
Clear query if None is passed.
Logs/tracebacks
-
Python Version
$ python --version
Python 3.10.0
multidict Version
$ python -m pip show multidict
Version: 6.0.2
yarl Version
$ python -m pip show yarl
Version: 1.7.2
OS
ubuntu
Additional context
No response
Code of Conduct
- [X] I agree to follow the aio-libs Code of Conduct