On Feb 16, 2020, at 10:20, Ned Deily <nad@python.org> wrote:
Rather than continuing this change in 3.9 introducing yet another, even more unexpected behavior, I think we should first try to address what appears to me to be the (a?) root cause issue: urlparse's API is not suited for parsing both strictly RFC-compliant URLs (which are clearly not well-understood) *and* today's schemeless URLs as have evolved over the years to become the most commonly encountered form of URL. Users want and need both. The merged change makes the previous situation worse, IMHO.
ISTM that the tension between doing the right thing and keeping backward compatibility should be explored through the addition of a new function with the intended semantics, or at least a new parameter (keyword-only?) that controls the behavior. I don’t like the latter as much, but if you really want to keep a single functional interface, that would be a way to do it.
I don’t agree that it’s obviously okay to introduce a backward incompatible default behavior in 3.9.
Cheers, -Barry