Bug report
Bug description:
While working with pathlib.WindowsPath
in Python, I am unable to compare two paths that Windows treats as the same:
import pathlib
path1 = pathlib.WindowsPath('/c/Temp/ServicesFix-3.4.Log')
path2 = pathlib.WindowsPath('C:/Temp/ServicesFix-3.4.Log')
print(path1 == path2) # False
print(path1.resolve() == path2.resolve()) # False
print(path1.resolve()) # WindowsPath('C:/c/Temp/ServicesFix-3.4.Log')
print(path2.resolve()) # WindowsPath('C:/Temp/ServicesFix-3.4.Log')
This is also the cause of an unexpected warning when using ipython
with uv
on Windows: astral-sh/uv#7466
CPython versions tested on:
3.12
Operating systems tested on:
Windows