# Bug report This shouldn't raise an exception: ```python >>> pathlib.PureWindowsPath('foo', 'a').with_name('a:b') ValueError: Invalid name 'a:b' ``` (affects all versions of pathlib) This _should_ raise an exception: ```python >>> pathlib.PurePath('foo', 'a').with_name('.') PurePosixPath('foo/.') ``` (affects 3.12 and up) <!-- gh-linked-prs --> ### Linked PRs * gh-110651 * gh-110678 <!-- /gh-linked-prs -->