[3.8] bpo-27657: Fix urlparse() with numeric paths (GH-661)#16839
[3.8] bpo-27657: Fix urlparse() with numeric paths (GH-661)#16839
Conversation
* 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>
|
This is a backport PR. Merging this. |
|
@orsenthil: Please replace |
May I ask why this was backported into Python 3.8.1? I totally understand the motivation behind this change, but isn't it a breaking change in a patch release? To quote an older comment from the original issue (bpo-27657):
I observed a certain fallout from this change (e.g. mozilla/bleach#503), so is there any chance that this gets reverted in python 3.8.2 or do you have any suggestions how to properly deal with cases like |
|
Hi @Ma27 - I re-read the whole issue again, I see that this message https://bugs.python.org/issue27657#msg289557 and the Versions in the issue set played a role in 'reverting' the patch or making the change in a patch release. This seems like a mistake when a simple path like Let's continue the discussion on https://bugs.python.org/issue27657 on the next steps. If this needs to be reverted again for the patch release. I will re-read associated issues again and share the possible next steps. |
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.
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.
(cherry picked from commit 5a88d50)
Co-authored-by: Tim Graham timograham@gmail.com
https://bugs.python.org/issue27657