Skip to content

pathlib ABCs: defer path joining #126409

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

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

barneygale
Copy link
Contributor

Defer joining of path segments in the private PurePathBase ABC. The new behaviour matches how the public PurePath class handles path segments.

This removes a hard-to-grok difference between the ABCs and the main classes. It also slightly reduces the size of PurePath objects by eliminating a _raw_path slot.

Defer joining of path segments in the private `PurePathBase` ABC. The new
behaviour matches how the public `PurePath` class handles path segments.

This slightly reduces the size of `PurePath` objects by eliminating a
`_raw_path` slot.
@barneygale barneygale marked this pull request as ready for review November 4, 2024 20:17
@barneygale barneygale merged commit 5e91684 into python:main Nov 5, 2024
36 checks passed
picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
Defer joining of path segments in the private `PurePathBase` ABC. The new
behaviour matches how the public `PurePath` class handles path segments.

This removes a hard-to-grok difference between the ABCs and the main
classes. It also slightly reduces the size of `PurePath` objects by
eliminating a `_raw_path` slot.
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Defer joining of path segments in the private `PurePathBase` ABC. The new
behaviour matches how the public `PurePath` class handles path segments.

This removes a hard-to-grok difference between the ABCs and the main
classes. It also slightly reduces the size of `PurePath` objects by
eliminating a `_raw_path` slot.
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.

1 participant