GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||
GeezerVison is showing github.com — gh-101000: Add os.path.splitroot() by barneygale · Pull Request #101002 · python/cpython Conversation
|
Thanks for the review! All good feedback I think! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'm persuaded that this is a good idea. Thanks for working on this!
Here's a docs review. Haven't got to looking at the implementation yet (will do soon).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Eryk Sun <[email protected]>
There was an error while loading. Please reload this page.
Co-authored-by: Eryk Sun <[email protected]>
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I believe there are currently no tests that os.path.splitroot works with os.PathLike objects. Just trivial tests like this should do fine, but we should make sure it's tested:
cpython/Lib/test/test_ntpath.py
Lines 946 to 947 in 0e75a55
| def test_path_splitdrive(self): | |
| self._check_function(self.path.splitdrive) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Alex Waygood <[email protected]>
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is looking really good to me now, and I'm very close to hitting "approve". My only concern (other than my comment about the NEWS entry) is that I'm still not sure the test coverage is quite there. It looks like the tests for splitdrive() account for a lot of edge cases that aren't really tackled in the tests for splitroot() yet, e.g.
cpython/Lib/test/test_ntpath.py
Lines 117 to 119 in e99e3cd
| # Issue #19911: UNC part containing U+0130 | |
| self.assertEqual(ntpath.splitdrive('//conky/MOUNTPOİNT/foo/bar'), | |
| ('//conky/MOUNTPOİNT', '/foo/bar')) |
and
cpython/Lib/test/test_ntpath.py
Lines 129 to 130 in e99e3cd
| tester('ntpath.splitdrive("//?/VOLUME{00000000-0000-0000-0000-000000000000}/spam")', | |
| ('//?/VOLUME{00000000-0000-0000-0000-000000000000}', '/spam')) |
It's true that, since splitdrive() now uses splitroot(), these edge cases are in some sense already covered -- the tests for splitdrive() will start failing if a bug is introduced to splitroot() at some later date in the future. But it will be highly confusing if the tests for splitdrive() start failing, yet the tests for splitroot() all still pass, when the bug is actually in the implementation for splitroot().
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hm. I could rename |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Yeah, I think that would make sense! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me. Thanks, as ever, for your patience and perseverance!
@eryksun, Any further comments from you? :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
(Planning to merge in a few days, unless @eryksun has any further feedback :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Eryk Sun <[email protected]> Co-authored-by: Alex Waygood <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.