[proxy] github.com← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light

bpo-27657: Fix urlparse() with numeric paths by timgraham · Pull Request #661 · python/cpython

the-knights-who-say-ni

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.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Oct 18, 2019

* 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>

miss-islington added a commit that referenced this pull request

Oct 18, 2019
* 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>

orsenthil pushed a commit that referenced this pull request

Oct 18, 2019
* 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>

orsenthil added a commit that referenced this pull request

Oct 18, 2019
* 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>

jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request

Dec 5, 2019
* 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.

shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request

Jan 31, 2020
* 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.

Open

orsenthil added a commit that referenced this pull request

Feb 16, 2020

This was referenced

Feb 16, 2020

Merged

Merged

orsenthil added a commit that referenced this pull request

Feb 16, 2020
This reverts commit 82b5f6b.

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.

tanj mentioned this pull request

Dec 28, 2020

Closed

Closed

4 tasks

Closed