Python 3.12.7 (main, Oct 8 2024, 00:39:14) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pathlib; pathlib.PureWindowsPath("C:\\A") / pathlib.PurePosixPath("/foo/C:\\B").relative_to("/")
PureWindowsPath('C:/B')
Python 3.13.0rc3 (main, Oct 7 2024, 23:18:57) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pathlib; pathlib.PureWindowsPath("C:\\A") / pathlib.PurePosixPath("/foo/C:\\B").relative_to("/")
PureWindowsPath('C:/A/foo/C:/B')
Bug report
Bug description:
3.12.7
3.13.0rc3
Not sure if it is a bug, or a fixed behaviour
CPython versions tested on:
3.12, 3.13
Operating systems tested on:
Linux
Linked PRs
WindowsPath(PosixPath(...))#125156WindowsPath(PosixPath(...))(GH-125156) #125409WindowsPath(PosixPath(...))(GH-125156) #125410