the-knights-who-say-ni · GitHub

* bpo-27657: Fix urlparse() with numeric paths
Revert parsing decision from bpo-754016 in favor of the documented
consensus in bpo-16932 of how to treat strings without a // to
designate the netloc.
* bpo-22891: Remove urlsplit() optimization for 'http' prefixed inputs.
(cherry picked from commit  5a88d50 )
Co-authored-by: Tim Graham <timograham@gmail.com>

Merged

@orsenthil

@orsenthil

@cdent cdent mentioned this pull request

Jan 17, 2020

Closed

@Ma27 Ma27 mentioned this pull request

Jan 28, 2020

Closed

Open

orsenthil added a commit that referenced this pull request

Feb 16, 2020

Merged

Merged

orsenthil added a commit that referenced this pull request

Feb 16, 2020
GH-18525)
This reverts commit  0f3187c .
The change broke the backwards compatibility of parsing behavior in a
patch release of Python (3.8.1). A decision was taken to revert this
patch in 3.8.2.
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.

Read the original on github.com ↗