Deprecate Windows-to-POSIX separator conversion via PurePosixPath(PureWindowsPath(...)))
#125012
Labels
PurePosixPath(PureWindowsPath(...)))
#125012
Feature or enhancement
This was probably never an intentional feature, and results in subtle behaviour:
PurePath
is documented as acceptingos.PathLike
objects, and so the additionalos.fspath()
call shouldn't really make a difference. See #103631 for why it does (spoiler: backwards-compatibility).Folks can use
PurePosixPath(PureWindowsPath().as_posix())
instead, which makes it more explicit that backwards-to-forwards slash conversion is desired.Linked PRs
PurePath
emitFutureWarning
when converting separators #125863The text was updated successfully, but these errors were encountered: