Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-110109: Churn pathlib.PurePath methods #112012

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Nov 13, 2023

Re-arrange pathlib.PurePath methods in source code. Ditto for PurePathTest. 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.

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.
@barneygale
Copy link
Contributor Author

@JelleZijlstra I requested your review as you previously approved #104243, which did a similar thing to pathlib.Path. Thank you!

@JelleZijlstra JelleZijlstra merged commit 2dbb2e0 into python:main Nov 17, 2023
25 checks passed
@barneygale
Copy link
Contributor Author

Thanks!

aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
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.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants