SIGN IN SIGN UP

GH-79634: Accept path-like objects as pathlib glob patterns. (#114017)

Allow `os.PathLike` objects to be passed as patterns to `pathlib.Path.glob()` and `rglob()`. (It's already possible to use them in `PurePath.match()`)

While we're in the area:

- Allow empty glob patterns in `PathBase` (but not `Path`)
- Speed up globbing in `PathBase` by generating paths with trailing slashes only as a final step, rather than for every intermediate directory.
- Simplify and speed up handling of rare patterns involving both `**` and `..` segments.
B
Barney Gale committed
6313cdde58f34648a430d2830357c9d2a5b67b87
Parent: 681e9e8
Committed by GitHub <noreply@github.com> on 1/20/2024, 2:10:25 AM