Jacob Walls <jacobtylerwa...@gmail.com> added the comment:

Both this ticket and #19094 started from one method in urllib.parse and then 
generalized a proposal for the rest of the submodule to move away from 
duck-typing and to instead raise TypeErrors (or at least some error) for 
invalid types. The attached PR does that. But it broke pip, which was passing 
None to the `fragment` argument of `urlunsplit()`.

In a blaze of efficiency, Pip already merged my fix, but since the CPython test 
suite depends on the current version of pip -- perhaps there's an argument for 
at least raising a deprecation warning for ``None`` and then converting to '' 
or b''? In any case, green CI makes patches more reviewable, so I'm inclined to 
add such a warning/conversion for now and then see how feedback goes. Cheers, 
all.

BTW: perhaps we can close this as dupe of #19094?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue22234>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to