◐ Shell
clean mode source ↗

gh-86943: implement `pathlib.WindowsPath.is_mount()` by barneygale · Pull Request #31458 · python/cpython

eryksun

@zmievsa

@barneygale

Will review soon

Don't worry about it - I'm trying to focus my efforts on two more important PRs: #31691 and #91882. The branch has conflicts anyway.

@barneygale barneygale changed the title bpo-42777: implement pathlib.WindowsPath.is_mount() gh-86943: implement pathlib.WindowsPath.is_mount()

Jul 30, 2022

@barneygale

Not sure what's going on with the test failure - looks like ntpath.ismount('C:/\x00') is true in main? It raises an exception in my Windows VM with Python 3.10.

@eryksun

Not sure what's going on with the test failure - looks like ntpath.ismount('C:/\x00') is true in main? It raises an exception in my Windows VM with Python 3.10.

The new implementation of normpath() strips the trailing null character. The old implementation keeps it.

These paths are invalid on posix and windows.

@eryksun

The new implementation of normpath() strips the trailing null character. The old implementation keeps it.

Do you think this needs to be fixed, or is it an improvement?

@barneygale

Do you think this needs to be fixed, or is it an improvement?

I think it's unlikely to come up in real world usage. IMO it's one of the quirks noted in 99fcf15:

This commit attempts to preserve every previously tested quirk, but these may be changed in the future to better align platforms.

brettcannon

brettcannon

@d1b d1b mannequin mentioned this pull request

Apr 10, 2022

iritkatriel pushed a commit to iritkatriel/cpython that referenced this pull request

Aug 11, 2022