diff options
author | Barney Gale <barney.gale@gmail.com> | 2025-02-17 19:15:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-17 19:15:59 +0000 |
commit | 6f07016bf01366da5939c4029c91b7f37ddddd55 (patch) | |
tree | 346eadb8b4061933ef041322769f1a61aec21899 /Lib/pathlib/_abc.py | |
parent | 7fcace99bbe1716c3e9713804e5bffaebdc8dd8f (diff) | |
download | cpython-6f07016bf01366da5939c4029c91b7f37ddddd55.tar.gz cpython-6f07016bf01366da5939c4029c91b7f37ddddd55.zip |
GH-127381: pathlib ABCs: remove `ReadablePath.rglob()` (#130207)
Remove `ReadablePath.rglob()` from the private pathlib ABCs. This method is
a trivial wrapper around `glob()` and easily replaced.
Diffstat (limited to 'Lib/pathlib/_abc.py')
-rw-r--r-- | Lib/pathlib/_abc.py | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/Lib/pathlib/_abc.py b/Lib/pathlib/_abc.py index 504f9bb0c76..33e963c944f 100644 --- a/Lib/pathlib/_abc.py +++ b/Lib/pathlib/_abc.py @@ -302,16 +302,6 @@ class ReadablePath(JoinablePath): select = globber.selector(parts) return select(self.joinpath('')) - def rglob(self, pattern, *, case_sensitive=None, recurse_symlinks=True): - """Recursively yield all existing files (of any kind, including - directories) matching the given relative pattern, anywhere in - this subtree. - """ - if not isinstance(pattern, JoinablePath): - pattern = self.with_segments(pattern) - pattern = '**' / pattern - return self.glob(pattern, case_sensitive=case_sensitive, recurse_symlinks=recurse_symlinks) - def walk(self, top_down=True, on_error=None, follow_symlinks=False): """Walk the directory tree from this directory, similar to os.walk().""" paths = [self] |