]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] GH-110488: Fix two small issues in `pathlib.PurePath.with_name()` (GH-110651...
authorBarney Gale <barney.gale@gmail.com>
Wed, 11 Oct 2023 04:30:23 +0000 (05:30 +0100)
committerGitHub <noreply@github.com>
Wed, 11 Oct 2023 04:30:23 +0000 (04:30 +0000)
commit9ffef4d797400de89fa9652fac99a4a171d05aed
tree40abfedda1192f261b3a173be369d8946a96130b
parentbe381b5df5957197d5d534560315e9adcd35aa24
[3.12] GH-110488: Fix two small issues in `pathlib.PurePath.with_name()` (GH-110651) (#110678)

Ensure that `PurePath('foo/a').with_name('.')` raises `ValueError`

Ensure that `PureWindowsPath('foo/a').with_name('a:b')` does not raise
`ValueError`.

(cherry picked from commit b5f7777cb3ecae02d49e0b348968c1ff1ffe21f4)
Lib/pathlib.py
Lib/test/test_pathlib.py
Misc/NEWS.d/next/Library/2023-10-10-22-54-56.gh-issue-110488.2I7OiZ.rst [new file with mode: 0644]