SIGN IN SIGN UP

GH-44626, GH-105476: Fix `ntpath.isabs()` handling of part-absolute paths (#113829)

On Windows, `os.path.isabs()` now returns `False` when given a path that
starts with exactly one (back)slash. This is more compatible with other
functions in `os.path`, and with Microsoft's own documentation.

Also adjust `pathlib.PureWindowsPath.is_absolute()` to call
`ntpath.isabs()`, which corrects its handling of partial UNC/device paths
like `//foo`.

Co-authored-by: Jon Foster <jon@jon-foster.co.uk>
B
Barney Gale committed
e4ff131e01184b68d868cfd241a03f8b7d2e0ff9
Parent: dac1da2
Committed by GitHub <noreply@github.com> on 1/13/2024, 7:36:05 AM