-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-42766 Fix 2 bugs in urllib.request.HTTPPasswordMgr.is_suburi #24181
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
Conversation
…est was considered below base when base was below test, added tests
This PR is stale because it has been open for 30 days with no activity. |
Closing and re-opening to restart a stuck CI check. |
The Pipelines failure is a single repeated test_asyncio failure in one of the 5 sets of tests. It can be ignored. |
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.
A failing example should have been added to each of the two PRs and a clear determination made if the second is a duplicate of the first or not.
Please say when you think the PR is ready to merge.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Co-authored-by: Terry Jan Reedy <[email protected]>
I have made the requested changes; please review again |
Thanks for making the requested changes! @terryjreedy: please review the changes made to this pull request. |
|
||
true = self.assertTrue | ||
false = self.assertFalse | ||
true(is_suburi(reduce_uri('http://example.com'), |
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.
It would be easier to understand the logic tested if there was a blank line between each subtest.
|
||
Both args must be URIs in reduced form. | ||
""" | ||
if base == test: | ||
return True | ||
if base[0] != test[0]: | ||
if base[0] != test[0] or len(test[1]) < len(base[1]): |
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.
The test cases pass even if this change is not included. Are you sure it's needed?
@@ -0,0 +1,3 @@ | |||
Fixed 2 bugs in urllib.request.HTTPPasswordMgr.is_suburi, added some tests |
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.
It would be useful to shortly describe the 2 bugs being fixed. One or two sentences should be enough.
It looks like this is being fixed in #31353 |
This PR was good in general, but this issue has been solved in #31353. Few minor issues with this PR:
It would be easy to address these comments, but an alternate PR was already written. In any case thank you. See for your future PRs. |
Change code in two places, noted in two issues, to match docstring, so
is_suburi(reduce_uri('http://example.com/sub_dir/sub_dir'), reduce_uri('http://example.com/sub_dir'))
is false.https://bugs.python.org/issue42766
https://bugs.python.org/issue42878