Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.2k
gh-68320, gh-88302 - Allow forpathlib.Path
subclassing#31691
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
brettcannon merged 53 commits intopython:mainfrombarneygale:bpo-44136-remove-pathlib-flavour-2Dec 23, 2022
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
53 commits Select commitHold shift + click to select a range
7371220
bpo-24132, bpo-44136 - Fix `pathlib.Path` subclassing.
barneygale8431d12
Add tests
barneygalebf2ad3a
Add tests for PurePath subclasses
barneygale4036e2e
Update Misc/NEWS.d/next/Library/2022-03-05-02-14-09.bpo-24132.W6iORO.rst
barneygale0d08533
Rename `PurePath._pathmod` to `PurePath._flavour` to reduce the diff.
barneygale0ad8022
Merge branch 'bpo-44136-remove-pathlib-flavour-2' of github.com:barne…
barneygale28992fc
Undo an unnecessary change to `Path.__new__()`
barneygaledbec230
Remove `_casefold()` and `_casefold_parts()` methods.
barneygaled814ee4
Merge branch 'main' into bpo-44136-remove-pathlib-flavour-2
barneygale63f1d68
Further simplify overall diff by inlining code from `compile_pattern()`
barneygale8dddfdf
Apply suggestions from code review
barneygaleb4da721
Address a couple bits of review feedback
barneygale7a166fd
Fix tests
barneygale1f4dff1
Fix docstring formatting.
barneygale51893c1
Remove FIXME comments
barneygale48b49b6
Merge branch 'main' into bpo-44136-remove-pathlib-flavour-2
barneygale3624c97
Update Lib/pathlib.py
barneygaleab54c14
Remove vestigal 'casefold' names.
barneygale2627417
Merge branch 'main' into bpo-44136-remove-pathlib-flavour-2
barneygalebc7aded
Restore comment on POSIX paths beginning `//` and tweak implementation.
barneygale4d6e4f3
Inline `_join_parsed_parts()` and `_make_child()` in `joinpath()`.
barneygale70ca838
Update Lib/pathlib.py
barneygalea2cc74f
Remove unused import
barneygale0e2478b
Make NEWS entry more precise.
barneygale0d0cf60
Apply suggestions from code review
barneygalef3048d3
Clarify `_pparts` and `_ncparts` naming.
barneygale8a213ae
Tidy up usage of `normcase()`
barneygale402dafe
Tweak `is_absolute()` to use `os.path.isabs()` wherever possible.
barneygale5cc3ab2
Stop using `self._flavour` in `as_uri()`.
barneygale19a8804
Remove `cls._flavour` identity check in `_parse_parts()`.
barneygale9da46bc
Fix Windows tests
barneygale29f9f81
Restore `_split_root()` method and its tests.
barneygale52851b8
Merge branch 'main' into bpo-44136-remove-pathlib-flavour-2
barneygaleb39da53
Optimize `_split_root()`
barneygalec7b18b1
Merge branch 'main' into bpo-44136-remove-pathlib-flavour-2
barneygale806ad15
Move `is_reserved()` implementation into `os.path` as a private funct…
barneygalea350009
Use `os.path.normcase()` when globbing.
barneygale799b40e
Simplify `_split_root()` implementation.
barneygalea6b25ea
Remove tests for malformed UNC paths
barneygaleac6f6e2
Merge branch 'main' into bpo-44136-remove-pathlib-flavour-2
brettcannonb8874df
Revert "Move `is_reserved()` implementation into `os.path` as a priva…
barneygale9d5e18a
Tweak _split_root() to use removesuffix()
barneygalef73f426
Remove test that `/b/c/d` and `///b/c/d` are equivalent.
barneygale37e4bc1
Restore comment linking to *Naming Files* page in Microsoft docs
barneygalee3f13ef
Apply suggestions from code review
barneygaleff4e1b3
Merge branch 'main' into bpo-44136-remove-pathlib-flavour-2
barneygale07c67d0
Clarify repr roundtrip tests.
barneygale950aa47
Reduce tests diff
barneygaled5f6f03
Remove test that `/b/c/d` and `///b/c/d` are equivalent.
barneygaleb66a4fb
Fix missing full stops.
barneygalefbaadf4
Remove four more test assertions affected by #96290
barneygale3692fdf
Merge branch 'main' into bpo-44136-remove-pathlib-flavour-2
barneygale40dc514
Wrap repr test cases in `self.subTest()` block
barneygaleFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Merge branch 'main' intobpo-44136-remove-pathlib-flavour-2
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commitd814ee4b4cd01ca15a6e74f5e9262a9abda18cfc
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
You are viewing a condensed version of this merge commit. You can view thefull changes here.
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.