]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Revert "bpo-27657: Fix urlparse() with numeric paths (GH-661)" (#18526)
authorSenthil Kumaran <senthil@uthcode.com>
Sun, 16 Feb 2020 21:07:25 +0000 (13:07 -0800)
committerGitHub <noreply@github.com>
Sun, 16 Feb 2020 21:07:25 +0000 (13:07 -0800)
commit505b6015a1579fc50d9697e4a285ecc64976397a
treeaea155991c487403001e5d195a4eaeed381878ec
parent46cf4fc8a5646ca35f7d1ac06d2ef33eb9efca1d
Revert "bpo-27657: Fix urlparse() with numeric paths (GH-661)" (#18526)

This reverts commit 82b5f6b16e051f8a2ac6e87ba86b082fa1c4a77f.

The change broke the backwards compatibility of parsing behavior in a
patch release of Python (3.7.6). A decision was taken to revert this
patch in 3.7.7.

In https://bugs.python.org/issue27657 it was decided that the previous
behavior like

>>> urlparse('localhost:8080')
ParseResult(scheme='', netloc='', path='localhost:8080', params='', query='', fragment='')

>>> urlparse('undefined:8080')
ParseResult(scheme='', netloc='', path='undefined:8080', params='', query='', fragment='')

needs to be preserved in patch releases as number of users rely upon it.

Explicitly mention the releases involved with the revert in NEWS.
Adopt the wording suggested by @ned-deily.
Lib/test/test_urlparse.py
Lib/urllib/parse.py
Misc/NEWS.d/next/Library/2020-02-16-07-47-55.bpo-27657.9kZchc.rst [new file with mode: 0644]