gh-63293: Reject non-string URL args and deprecate false values in urllib.parse

gh-63293: Reject non-string URL args and deprecate false values in urllib.parse Truthy values other than str/bytes previously failed with AttributeError.

False values such as 0 and [] were silently treated as empty. Require
str, bytes, or None in _coerce_args(): raise TypeError for other truthy 
values, and emit DeprecationWarning for other false values, scheduled 
to become TypeError in 3.18. This extends the 3.14 deprecation for 
parse_qsl()/parse_qs().

Original patch by Jacob Walls.

---- 

Co-authored-by: Senthil Kumaran <senthil@python.org>
6 files changed