]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-113528: Deoptimise `pathlib._abc.PurePathBase.relative_to()` (#113529)
authorBarney Gale <barney.gale@gmail.com>
Sat, 6 Jan 2024 21:37:38 +0000 (21:37 +0000)
committerGitHub <noreply@github.com>
Sat, 6 Jan 2024 21:37:38 +0000 (21:37 +0000)
commita15a7735e69862fdfc0ed21bc1ade3a32833a01d
tree8686f98cb96a96591425c0eb3e04bb088cd576a2
parent37bd893a22b784d573b71df5417d855dc32dee62
GH-113528: Deoptimise `pathlib._abc.PurePathBase.relative_to()` (#113529)

Replace use of `_from_parsed_parts()` with `with_segments()` in
`PurePathBase.relative_to()`, and move the assignment of `_drv`, `_root`
and `_tail_cached` slots into `PurePath.relative_to()`.
Lib/pathlib/__init__.py
Lib/pathlib/_abc.py