]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
pathlib ABCs: defer path joining (#126409)
authorBarney Gale <barney.gale@gmail.com>
Tue, 5 Nov 2024 21:19:36 +0000 (21:19 +0000)
committerGitHub <noreply@github.com>
Tue, 5 Nov 2024 21:19:36 +0000 (21:19 +0000)
commit5e9168492f12c579b2481f3f3e0ae11f9d986857
tree08e03f719d3f6eb690b70e7d8b246731d6dae31a
parentf51fd84034e2cbf458321c25ba6fd085a39d6f6f
pathlib ABCs: defer path joining (#126409)

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.
Lib/pathlib/_abc.py
Lib/pathlib/_local.py
Lib/test/test_pathlib/test_pathlib_abc.py