Feature or enhancement
Speed up os.path.splitroot() by implementing it in C.
Pitch
Per @eryksun:
I think splitroot() warrants a C implementation since it's a required step in our basic path handling on Windows -- join(), split(), relpath(), and commonpath(). Speeding it up gives a little boost across the board. Also, it would be less confusing if nt._path_splitroot() actually implemented ntpath.splitroot().
If implemented, using _Py_splitroot() in _Py_normpath() would help to ensure consistency. Currently, for example, ntpath.normpath('//?/UNC/server/share/../..') is correct on POSIX but wrong on Windows because _Py_normpath() incorrectly handles "//?/UNC/" as the root instead of "//?/UNC/server/share/".
Previous discussion
Linked PRs
Feature or enhancement
Speed up
os.path.splitroot()by implementing it in C.Pitch
Per @eryksun:
Previous discussion
Linked PRs
os.path.splitroot()#118089os.path.normpath()for UNC paths on Windows. #119394os.path.splitrootparam name frompathback top#124097os.path.splitrootparam name frompathback top(GH-124097) #124919