]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-110109: Churn `pathlib.PurePath` methods (#112012)
authorBarney Gale <barney.gale@gmail.com>
Fri, 17 Nov 2023 15:32:50 +0000 (15:32 +0000)
committerGitHub <noreply@github.com>
Fri, 17 Nov 2023 15:32:50 +0000 (07:32 -0800)
commit2dbb2e035b968811ddc00317ccf0cadafacffe1c
treec99481dd70112cdff2192614811e76e81a25575f
parent7c50800241997f93647a57354c052de2cec25d04
GH-110109: Churn `pathlib.PurePath` methods (#112012)

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

The `PurePath` implementations of certain special methods, such as
`__eq__()` and `__hash__()`, are not usually applicable to user subclasses
of `_PathBase`. To facilitate their removal, another patch will split the
`PurePath` class into `_PurePathBase` and `PurePath`, with the latter
providing these special methods.

This patch prepares the ground for splitting `PurePath`. It's similar to
e8d77b0, which preceded splitting `Path`. By churning the methods here,
subsequent patches will be easier to review and less likely to break
things.
Lib/pathlib.py
Lib/test/test_pathlib.py