bpo-42766 Fix 2 bugs in urllib.request.HTTPPasswordMgr.is_suburi#24181
bpo-42766 Fix 2 bugs in urllib.request.HTTPPasswordMgr.is_suburi#24181yairfrid wants to merge 8 commits intopython:mainfrom
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. |
|
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.
It would be easier to understand the logic tested if there was a blank line between each subtest.
| 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.
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.
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