◐ Shell
clean mode source ↗

GH-125413: pathlib ABCs: use `scandir()` to speed up `glob()` by barneygale · Pull Request #126261 · python/cpython

Use the new `PathBase.scandir()` method in `PathBase.glob()`, which greatly
reduces the number of `PathBase.stat()` calls needed when globbing.

There are no user-facing changes, because the pathlib ABCs are still
private and `Path.glob()` doesn't use the implementation in its superclass.

picnixz pushed a commit to picnixz/cpython that referenced this pull request

Dec 8, 2024
…ython#126261)

Use the new `PathBase.scandir()` method in `PathBase.glob()`, which greatly
reduces the number of `PathBase.stat()` calls needed when globbing.

There are no user-facing changes, because the pathlib ABCs are still
private and `Path.glob()` doesn't use the implementation in its superclass.

ebonnal pushed a commit to ebonnal/cpython that referenced this pull request

Jan 12, 2025
…ython#126261)

Use the new `PathBase.scandir()` method in `PathBase.glob()`, which greatly
reduces the number of `PathBase.stat()` calls needed when globbing.

There are no user-facing changes, because the pathlib ABCs are still
private and `Path.glob()` doesn't use the implementation in its superclass.