]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-101362: Check pathlib.Path flavour compatibility at import time (GH-101664)
authorBarney Gale <barney.gale@gmail.com>
Sun, 5 Mar 2023 22:46:45 +0000 (22:46 +0000)
committerGitHub <noreply@github.com>
Sun, 5 Mar 2023 22:46:45 +0000 (14:46 -0800)
commit3e60e0213e9d884a2f4cef4df96956c5d4adde0a
tree8a5bb774128ec2d8add4fec68caacd9385b2414b
parent3572c861d8e8f03c34793608e7e2221e116aaec0
GH-101362: Check pathlib.Path flavour compatibility at import time (GH-101664)

This saves a comparison in `pathlib.Path.__new__()` and reduces the time taken to run `Path()` by ~5%.

Automerge-Triggered-By: GH:AlexWaygood
Lib/pathlib.py
Misc/NEWS.d/next/Library/2023-02-07-20-46-08.gh-issue-101362.2ckZ6R.rst [new file with mode: 0644]