Hi Łukasz ,

I wanted to push a revert in urlparse module in Python 3.8.2

I sent a note about this to python-committers, are you okay with this?

Thanks,
Senthil

On Mon, Feb 10, 2020 at 6:27 AM Senthil Kumaran <senthil@uthcode.com> wrote:
Hello Python-Committers,

In https://bugs.python.org/issue27657, I introduced a regression in a minor release.
The original patch to parsing logic of URL, cleaned up a lot of corner cases (https://github.com/python/cpython/pull/661) and I felt good about the change.
However, the mistake was with the backport.

Demo:

$ ./python
Python 3.8.0 (default, Feb 10 2020, 06:15:43)
[GCC 9.2.1 20191008] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib.parse import urlparse
>>> urlparse('localhost:8080')
ParseResult(scheme='', netloc='', path='localhost:8080', params='', query='', fragment='')

----

$ ./python
Python 3.8.1+ (heads/3.8:b086ea5edc, Feb 10 2020, 06:15:44)
[GCC 9.2.1 20191008] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib.parse import urlparse
>>> urlparse('localhost:8080')
ParseResult(scheme='localhost', netloc='', path='8080', params='', query='', fragment='')

---

When I read an associated bug report against a user of the software (like this: https://github.com/mozilla/bleach/issues/503) - I feel that this was a mistake.
The change of test-suite in minor versions should have alerted me, but I seem to have missed it.

I am planning to revert this change in 3.8.2 and 3.7.7
Should I highlight this in any documentation?  Thoughts and opinions?

Thank you,
Senthil