]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-103548: Improve performance of `pathlib.Path.[is_]absolute()` (GH-103549)
authorBarney Gale <barney.gale@gmail.com>
Sat, 6 May 2023 18:03:07 +0000 (19:03 +0100)
committerGitHub <noreply@github.com>
Sat, 6 May 2023 18:03:07 +0000 (18:03 +0000)
commitde7f694e3c92797fe65f04cd2c6941ed0446bb24
tree362c32facc52502df7e993d51e6c84ae6de851f3
parent376137f6ec73e0800e49cec6100e401f6154b693
GH-103548: Improve performance of `pathlib.Path.[is_]absolute()` (GH-103549)

Improve performance of `pathlib.Path.absolute()` and `cwd()` by joining paths only when necessary. Also improve
performance of `PurePath.is_absolute()` on Posix by skipping path parsing and normalization.
Lib/pathlib.py
Misc/NEWS.d/next/Library/2023-04-14-21-16-05.gh-issue-103548.lagdpp.rst [new file with mode: 0644]