Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.7] bpo-27657: Revert - Fix urlparse() with numeric paths (GH-661)" #18526

Merged
merged 1 commit into from
Feb 16, 2020
Merged

[3.7] bpo-27657: Revert - Fix urlparse() with numeric paths (GH-661)" #18526

merged 1 commit into from
Feb 16, 2020

Conversation

orsenthil
Copy link
Member

@orsenthil orsenthil commented Feb 16, 2020

[bpo-27657](https://bugs.python.org/issue27657): Revert - Fix urlparse() with numeric paths (GH-661)

This reverts commit 82b5f6b.

The change broke the backward 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 users rely upon it.

https://bugs.python.org/issue27657

@@ -0,0 +1,4 @@
In "bpo-27657: Fix urlparse() with numeric paths (GH-661) (#16839)", the
change broke the backwards compatibility of an undefined parsing behavior in
a patch release. The behavior was relied upon by users. A decision was taken
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should explicitly mention the releases involved. For 3.7, how about something like:

The original fix for bpo-27657, "Fix urlparse() with numeric paths" (GH-16839)
included in 3.7.6, inadvertently introduced a behavior change that broke several third-party packages relying on the original undefined parsing behavior. The change is reverted in 3.7.7, restoring the behavior of 3.7.5 and earlier releases.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Ned. I have adopted this suggestion.

@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

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.
@orsenthil
Copy link
Member Author

I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@ned-deily: please review the changes made to this pull request.

Copy link
Member

@ned-deily ned-deily left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks, Senthil!

@bedevere-bot
Copy link

@orsenthil: Please replace # with GH- in the commit message next time. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants