Posts Tagged regression

Surprising Change in Python 3.7.6

Here's a surprising change for you: Python 3.7.6 (ostensibly, a patch bugfix release) totally changed how URLs are parsed by Python programs.

As of Python 3.7.5, a URL like foo:8888 would be parsed into the following:

>>> urllib.parse.urlparse('foo:8888')
ParseResult(scheme='', netloc='', path='foo:8888', params='', query='', fragment='')

As of Python 3.7.6, foo is now detected as the scheme:

>>> urllib.parse.urlparse('foo:8888')
ParseResult(scheme='foo', netloc='', path='8888', params='', query='', fragment='')

This will cause massive chaos if you are ever parsing URLs with ports in them but without schemes …

read more