gh-86943: implement `pathlib.WindowsPath.is_mount()` by barneygale · Pull Request #31458 · python/cpython
barneygale
changed the title
bpo-42777: implement
gh-86943: implement pathlib.WindowsPath.is_mount()pathlib.WindowsPath.is_mount()
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.
Not sure what's going on with the test failure - looks like
ntpath.ismount('C:/\x00')is true inmain? 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.
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?
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.
d1b
mannequin
mentioned this pull request