]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-110488: Fix two small issues in `pathlib.PurePath.with_name()` (#110651)
authorBarney Gale <barney.gale@gmail.com>
Wed, 11 Oct 2023 03:45:11 +0000 (04:45 +0100)
committerGitHub <noreply@github.com>
Wed, 11 Oct 2023 03:45:11 +0000 (04:45 +0100)
commitb5f7777cb3ecae02d49e0b348968c1ff1ffe21f4
treed73d8a086ed6c573d00c7b541c72bbbeb5ea5206
parent790ecf6302e47b84da5d1c3b14dbdf070bce615b
GH-110488: Fix two small issues in `pathlib.PurePath.with_name()` (#110651)

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

Ensure that `PureWindowsPath('foo/a').with_name('a:b')` does not raise
`ValueError`.
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]