-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
bpo-29651: Cover edge case of square brackets in urllib docs #1128
Conversation
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.
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! |
small nit point: title bpo colon should have one space after it. |
Ah good call - thanks! |
There was a problem hiding this 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.
For sure - I'll try to push a commit out by this time tomorrow! Thanks for pointing me in the right direction. |
Another concern, should this documentation explain why unmatched square brackets return a |
@howinator - this looks good as it is. Thanks for the PR. |
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.