Skip to content

bpo-29651: Cover edge case of square brackets in urllib docs #1128

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

Merged

Conversation

howinator
Copy link
Contributor

Per bpo-29651, there is an edge case in urllib.parse where a ValueError
will be returned if there are unmatched square brackets in the netloc
attribute of a URL. This behavior is shown here.
This PR explicitly states this edge case in the docs.

Per bpo-29651, there is an edge case in urllib.parse where a ValueError
will be returned if there are unmatched square brackets in the `netloc`
attribute of a URL. This behavior is shown [here](https://github.com/python/cpython/blob/e32ec93/Lib/urllib/parse.py#L406-L408).
This PR explicitly states this edge case in the docs.
@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA. This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

@howinator howinator changed the title Cover edge case of square brackets in urllib docs bpo-29651:Cover edge case of square brackets in urllib docs Apr 14, 2017
@louisom
Copy link
Contributor

louisom commented Apr 14, 2017

small nit point: title bpo colon should have one space after it.

@howinator howinator changed the title bpo-29651:Cover edge case of square brackets in urllib docs bpo-29651: Cover edge case of square brackets in urllib docs Apr 14, 2017
@howinator
Copy link
Contributor Author

Ah good call - thanks!

Copy link
Member

@berkerpeksag berkerpeksag left a comment

Choose a reason for hiding this comment

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

Could you check that this behavior is tested in Lib/test/test_urlparse.py? If not, adding some tests with a comment and link to bpo-29651 would be great.

@howinator
Copy link
Contributor Author

For sure - I'll try to push a commit out by this time tomorrow! Thanks for pointing me in the right direction.

@howinator
Copy link
Contributor Author

Actually, this behavior is already tested here. Should I also post a link to these tests on bpo-29651?

@howinator
Copy link
Contributor Author

Another concern, should this documentation explain why unmatched square brackets return a ValueError? I can include a brief explanation of RFC 2732.

@orsenthil
Copy link
Member

@howinator - this looks good as it is. Thanks for the PR.

@orsenthil orsenthil merged commit f6e863d into python:master May 16, 2017
orsenthil added a commit that referenced this pull request May 16, 2017
orsenthil added a commit that referenced this pull request May 16, 2017
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.

6 participants