]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-89812: Churn `pathlib.Path` methods (GH-104243)
authorBarney Gale <barney.gale@gmail.com>
Sun, 7 May 2023 19:07:07 +0000 (20:07 +0100)
committerGitHub <noreply@github.com>
Sun, 7 May 2023 19:07:07 +0000 (20:07 +0100)
commite8d77b03e08a4c7e7dde0830c5a12a0b41ff7c33
tree24fa3412af82f52c832f263ab15a5c307fdc05b9
parent2c2dc61e8d01f44e5b7e63dd99196460a80905f1
GH-89812: Churn `pathlib.Path` methods (GH-104243)

Re-arrange `pathlib.Path` methods in source code. No other changes.

The methods are arranged as follows:

1. `stat()` and dependants (`exists()`, `is_dir()`, etc)
2. `open()` and dependants (`read_text()`, `write_bytes()`, etc)
3. `iterdir()` and dependants (`glob()`, `walk()`, etc)
4. All other `Path` methods

This patch prepares the ground for a new `_AbstractPath` class, which will
support the methods in groups 1, 2 and 3 above. By churning the methods
here, subsequent patches will be easier to review and less likely to break
things.
Lib/pathlib.py