GH-117586: Speed up `pathlib.Path.walk()` by working with strings (#117726)
Move `pathlib.Path.walk()` implementation into `glob._Globber`. The new `glob._Globber.walk()` classmethod works with strings internally, which is a little faster than generating `Path` objects and keeping them normalized. The `pathlib.Path.walk()` method converts the strings back to path objects. In the private pathlib ABCs, our existing subclass of `_Globber` ensures that `PathBase` instances are used throughout. Follow-up to #117589.
B
Barney Gale committed
0cc71bde001950d3634c235e2b0d24cda6ce7dce
Parent: 6258844
Committed by GitHub <[email protected]>
on 4/11/2024, 12:26:53 AM