This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author arcivanov
Recipients arcivanov
Date 2021-05-02.03:29:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619926177.78.0.708746826424.issue44007@roundup.psfhosted.org>
In-reply-to
Content
$ ~/.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.
History
Date User Action Args
2021-05-02 03:29:37arcivanovsetrecipients: + arcivanov
2021-05-02 03:29:37arcivanovsetmessageid: <1619926177.78.0.708746826424.issue44007@roundup.psfhosted.org>
2021-05-02 03:29:37arcivanovlinkissue44007 messages
2021-05-02 03:29:36arcivanovcreate