]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] GH-103631: Fix `PurePosixPath(PureWindowsPath(...))` separator handling (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 26 May 2023 18:42:36 +0000 (11:42 -0700)
committerGitHub <noreply@github.com>
Fri, 26 May 2023 18:42:36 +0000 (18:42 +0000)
commit305d78b71481e309051b1b88f363805d8c0ad34a
tree196b919be2dd7bab2bb85d4d423e33f3503a55bb
parenteca102ddac77a42c6fda62a283fe0802e0ff5549
[3.12] GH-103631: Fix `PurePosixPath(PureWindowsPath(...))` separator handling (GH-104949) (GH-104991)

For backwards compatibility, accept backslashes as path separators in
`PurePosixPath` if an instance of `PureWindowsPath` is supplied.
This restores behaviour from Python 3.11.

(cherry picked from commit 328422ce6162eb18735a2c0de12f8a696be97d0c)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Lib/pathlib.py
Lib/test/test_pathlib.py
Misc/NEWS.d/next/Library/2023-05-25-23-34-54.gh-issue-103631.x5Urye.rst [new file with mode: 0644]