New submission from Arcadiy Ivanov <arca...@ivanov.biz>:
$ ~/.pyenv/versions/3.8.6/bin/python3.8 Python 3.8.6 (default, Oct 8 2020, 13:32:06) [GCC 10.2.1 20200723 (Red Hat 10.2.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from urllib.parse import urlparse >>> urlparse("host:123", "http") ParseResult(scheme='http', netloc='', path='host:123', params='', query='', fragment='') >>> $ ~/.pyenv/versions/3.8.9/bin/python3.8 Python 3.8.9 (default, May 1 2021, 23:27:11) [GCC 11.1.1 20210428 (Red Hat 11.1.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from urllib.parse import urlparse >>> urlparse("host:123", "http") ParseResult(scheme='http', netloc='', path='host:123', params='', query='', fragment='') >>> $ ~/.pyenv/versions/3.9.4/bin/python3.9 Python 3.9.4 (default, Apr 8 2021, 17:27:49) [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from urllib.parse import urlparse >>> urlparse("host:123", "http") ParseResult(scheme='host', netloc='', path='123', params='', query='', fragment='') >>> While I'm not sure, it seems to me that 3.9 is wrong here, given that the default scheme is specified as a second parameter to URL parse, i.e. "host:123" should be treated as "http://host:123" as in 3.8. We also relied on this parser behavior, i.e. for us it's a regression. ---------- components: Library (Lib) messages: 392654 nosy: arcivanov priority: normal severity: normal status: open title: urlparse("host:123", "http") inconsistent between 3.8 and 3.9 versions: Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44007> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com