-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-101000: Add os.path.splitroot() #101002
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
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
21c0ba9
gh-101000: Add os.path.splitroot()
barneygale 836b85d
Use splitroot() from pathlib
barneygale bc2d1f9
Use splitroot() from posixpath
barneygale ecdc40d
Use splitroot() from ntpath
barneygale 6592b27
Optimizations
barneygale 78f4227
Correct and expand examples in splitroot() docstring
barneygale 9726ca4
Update Lib/ntpath.py
barneygale 7a6613c
Use splitroot() from pathlib.PurePath.with_name()
barneygale 26a8dba
Reduce ntpath.normpath() diff noise
barneygale 0c237d4
Simplify ntpath.commonpath() now that 'isabs' is unused.
barneygale 11ed3eb
Reduce posixpath.normpath() diff noise
barneygale 2c9eed8
Improve documentation
barneygale 8299e96
Add whatsnew entry.
barneygale 27ffe37
Simplify ntpath.splitroot() slightly
barneygale 9beff2a
Apply suggestions from code review
barneygale bacdee1
Update Doc/library/os.path.rst
barneygale 4ebe545
Note that drive may be empty on Windows
barneygale 2927afe
Re-order drive example
barneygale b0aa73e
Update Doc/library/os.path.rst
barneygale 19777d6
Adjust docstring examples
barneygale 32e212e
Apply suggestions from code review
barneygale 37cded3
Update Doc/library/os.path.rst
barneygale 5a8dfce
Change example username in docs to 'Sam'
barneygale 0e75a55
Adjust first paragraph to use prose
barneygale 3663237
Update Doc/library/os.path.rst
barneygale 053729d
Add tests for bytes (POSIX only) and path-like objects (both platforms)
barneygale 694f093
Add tests for mixed path separators (Windows only)
barneygale e99e3cd
Remove errant newline.
barneygale f618a00
Move most test cases from `test_splitdrive` to `test_splitroot`
barneygale 1c522c9
Mention pathlib performance improvement in news entry.
barneygale df17269
Merge branch 'main' into gh-101000-splitroot
AlexWaygood File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.